summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-09-02 05:03:26 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-02 05:17:15 -0700
commit132d951d4392c4f0fd9aa012626b861b49ccaa8d (patch)
treed6cfa0a5b87e685b356fdf7d055ce7fa8f9589a5 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent3e5c243396b6acf1a76d66d80c798466dc5caa55 (diff)
update the volume information first before checksum
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1504 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1504
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 6bcbf8c0e46..8ae2b03924c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1231,7 +1231,7 @@ glusterd_compare_friend_volume (dict_t *vols, int32_t count, int32_t *status)
if (ret)
goto out;
- if (version != volinfo->version) {
+ if (version > volinfo->version) {
//Mismatch detected
ret = 0;
gf_log ("", GF_LOG_ERROR, "Version of volume %s differ."
@@ -1239,7 +1239,10 @@ glusterd_compare_friend_volume (dict_t *vols, int32_t count, int32_t *status)
volinfo->volname, volinfo->version, version);
*status = GLUSTERD_VOL_COMP_UPDATE_REQ;
goto out;
- }
+ } else if (version < volinfo->version) {
+ *status = GLUSTERD_VOL_COMP_SCS;
+ goto out;
+ }
//Now, versions are same, compare cksums.
//