summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2018-01-29 10:23:52 +0530
committerAmar Tumballi <amarts@redhat.com>2018-01-31 09:12:17 +0000
commitbb34b07fd2ec5e6c3eed4fe0cdf33479dbf5127b (patch)
tree256953645ada3f87871c0701f981e0497c4abeec
parent4475150a5792743a016801dc72573416389810d1 (diff)
glusterd: optimize glusterd import volumes code path
In case there's a version mismatch detected for one of the volumes glusterd was ending up with updating all the volumes which is a overkill. Change-Id: I6df792db391ce3a1697cfa9260f7dbc3f59aa62d BUG: 1539510 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 2865edd..d203b86 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4832,16 +4832,18 @@ glusterd_compare_friend_data (dict_t *peer_data, int32_t *status,
ret = 0;
goto out;
}
- if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status)
+ if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status) {
+ ret = glusterd_import_friend_volume (peer_data, i);
+ if (ret) {
+ goto out;
+ }
update = _gf_true;
-
+ *status = GLUSTERD_VOL_COMP_NONE;
+ }
i++;
}
if (update) {
- ret = glusterd_import_friend_volumes (peer_data);
- if (ret)
- goto out;
glusterd_svcs_manager (NULL);
}