From af9022dc13863965feb5b6a3b30d817ef3d94216 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 21 Mar 2018 09:08:15 +0530 Subject: [PATCH 650/650] glusterd/snapshot : fix the compare snap logic In one of the case in commit cb0339f there's one particular case where after removing the old snap it wasn't writing the new snap version and this resulted into one of the test to fail spuriously. > upstream mainline patch : https://review.gluster.org/#/c/19536/ >BUG: 1540607 >Change-Id: I3b737754edb0c7aba93ca1f149f2ffe16f3f48f4 >Signed-off-by: Atin Mukherjee BUG: 1556670 Change-Id: I7a2448c8f8cf7efdb668474cb9df4c7725b6b36b Signed-off-by: Atin Mukherjee Reviewed-on: https://code.engineering.redhat.com/gerrit/133381 Tested-by: RHGS Build Bot --- xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c index e32fb29..680802b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c @@ -1889,6 +1889,9 @@ glusterd_compare_snap (dict_t *peer_data, int32_t snap_count, snprintf (buf, sizeof(buf), "%s.remove_my_data", prefix); ret = dict_set_uint32 (peer_data, buf, 1); + snprintf (buf, sizeof(buf), "%s.accept_peer_data", + prefix); + ret = dict_set_uint32 (peer_data, buf, 1); } else { ret = 0; } -- 1.8.3.1