From 35e77e239aaa1abafe45727f76aaa61ba41cc484 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 27 Apr 2015 01:20:02 +0530 Subject: libglusterfs: Fix cluster_entrylk retry Change-Id: I92ff46bae36d39a449d4bbaedc88a322992f65eb BUG: 1215265 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/10391 Tested-by: Gluster Build System Reviewed-by: Krutika Dhananjay (cherry picked from commit e6f2472d2434ab43a30720ef4de2e0abc0a3f4ac) Reviewed-on: http://review.gluster.org/10597 Reviewed-by: Pranith Kumar Karampuri --- libglusterfs/src/cluster-syncop.c | 6 +++--- .../bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libglusterfs/src/cluster-syncop.c b/libglusterfs/src/cluster-syncop.c index 9525bc55510..10993e6088d 100644 --- a/libglusterfs/src/cluster-syncop.c +++ b/libglusterfs/src/cluster-syncop.c @@ -1172,9 +1172,9 @@ cluster_entrylk (xlator_t **subvols, unsigned char *on, int numsubvols, cluster_unentrylk (subvols, locked_on, numsubvols, replies, output, frame, this, dom, inode, name); - FOP_ONLIST (subvols, on, numsubvols, replies, - locked_on, frame, entrylk, dom, &loc, name, - ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL); + FOP_SEQ (subvols, on, numsubvols, replies, + locked_on, frame, entrylk, dom, &loc, name, + ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL); break; } } diff --git a/tests/bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t b/tests/bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t index e5b53bd0d24..120facff02e 100755 --- a/tests/bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t +++ b/tests/bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t @@ -10,6 +10,9 @@ cleanup; +function get_bitd_count { + ps auxw | grep glusterfs | grep bitd.pid | grep -v grep | wc -l +} ## Start a 2 node virtual cluster TEST launch_cluster 2; @@ -30,8 +33,7 @@ TEST $CLI_1 volume bitrot $V0 enable ## Bitd daemon should be running on the node which is having brick. Here node1 ## only have brick so bitrot daemon count value should be 1. -bitrot_daemon=$(ps auxww | grep glusterfs | grep bitd.pid | grep -v grep | wc -l) -TEST [ "$bitrot_daemon" -eq 1 ]; +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count ## Bitd daemon should not run on 2nd node and it should not create bitrot ## volfile on this node. Below test case it to check whether its creating bitrot -- cgit