From e2ac34fcc26e4e22d97aad8ac263d7a726f71bac Mon Sep 17 00:00:00 2001 From: Krishnan P Date: Tue, 21 Jun 2011 01:14:35 +0000 Subject: pump: mark pending before notify to children to avoid race in single CPU. Signed-off-by: Krishnan Parthasarathi Signed-off-by: Anand Avati BUG: 3050 ('replace-brick' hangs on vm's) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3050 --- xlators/cluster/afr/src/pump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index 6a932e74e4c..c0490820cb8 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -840,13 +840,13 @@ pump_cmd_start_setxattr_cbk (call_frame_t *frame, "Successfully initiated destination " "brick connect"); + pump_mark_start_pending (this); + /* send the PARENT_UP as pump is ready now */ prev = cookie; if (prev && prev->this) prev->this->notify (prev->this, GF_EVENT_PARENT_UP, this); - pump_mark_start_pending (this); - out: local->op_ret = ret; pump_command_reply (frame, this); -- cgit