diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2018-01-29 10:23:52 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2018-03-08 06:44:17 +0000 |
commit | 6eea52906f375d484af092e7a9434c28480dc02b (patch) | |
tree | b6a85362e6edb9f64c828392b51d15846985e5c5 | |
parent | e304d218602f3099dc4ba9bb86fd953cee8a8e59 (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.
>mainline patch : https://review.gluster.org/#/c/19358/
Change-Id: I6df792db391ce3a1697cfa9260f7dbc3f59aa62d
BUG: 1543709
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
(cherry picked from commit bb34b07fd2ec5e6c3eed4fe0cdf33479dbf5127b)
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 12 |
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 2cc1df22acb..69cbea7540e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4800,16 +4800,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); } |