|
|
a3470f |
From bab10010daf3dc93492e7770e4084f0f422e3b0c Mon Sep 17 00:00:00 2001
|
|
|
a3470f |
From: Atin Mukherjee <amukherj@redhat.com>
|
|
|
a3470f |
Date: Mon, 29 Jan 2018 10:23:52 +0530
|
|
|
a3470f |
Subject: [PATCH 145/148] glusterd: optimize glusterd import volumes code path
|
|
|
a3470f |
|
|
|
a3470f |
In case there's a version mismatch detected for one of the volumes
|
|
|
a3470f |
glusterd was ending up with updating all the volumes which is a
|
|
|
a3470f |
overkill.
|
|
|
a3470f |
|
|
|
a3470f |
>upstream mainline patch : https://review.gluster.org/#/c/19358/
|
|
|
a3470f |
|
|
|
a3470f |
Change-Id: I6df792db391ce3a1697cfa9260f7dbc3f59aa62d
|
|
|
a3470f |
BUG: 1540600
|
|
|
a3470f |
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
a3470f |
Reviewed-on: https://code.engineering.redhat.com/gerrit/129935
|
|
|
a3470f |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
a3470f |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
a3470f |
---
|
|
|
a3470f |
xlators/mgmt/glusterd/src/glusterd-utils.c | 12 +++++++-----
|
|
|
a3470f |
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
a3470f |
|
|
|
a3470f |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
a3470f |
index 4bb54db..d991a9f 100644
|
|
|
a3470f |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
a3470f |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
a3470f |
@@ -4819,16 +4819,18 @@ glusterd_compare_friend_data (dict_t *peer_data, int32_t *status,
|
|
|
a3470f |
ret = 0;
|
|
|
a3470f |
goto out;
|
|
|
a3470f |
}
|
|
|
a3470f |
- if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status)
|
|
|
a3470f |
+ if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status) {
|
|
|
a3470f |
+ ret = glusterd_import_friend_volume (peer_data, i);
|
|
|
a3470f |
+ if (ret) {
|
|
|
a3470f |
+ goto out;
|
|
|
a3470f |
+ }
|
|
|
a3470f |
update = _gf_true;
|
|
|
a3470f |
-
|
|
|
a3470f |
+ *status = GLUSTERD_VOL_COMP_NONE;
|
|
|
a3470f |
+ }
|
|
|
a3470f |
i++;
|
|
|
a3470f |
}
|
|
|
a3470f |
|
|
|
a3470f |
if (update) {
|
|
|
a3470f |
- ret = glusterd_import_friend_volumes (peer_data);
|
|
|
a3470f |
- if (ret)
|
|
|
a3470f |
- goto out;
|
|
|
a3470f |
glusterd_svcs_manager (NULL);
|
|
|
a3470f |
}
|
|
|
a3470f |
|
|
|
a3470f |
--
|
|
|
a3470f |
1.8.3.1
|
|
|
a3470f |
|