From 6c88889e333fcaaa8ddcd136f480108007e339c1 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 19 May 2016 16:24:09 +0530 Subject: cluster/afr: Do not inode_link in afr Race is explained at https://bugzilla.redhat.com/show_bug.cgi?id=1337405#c0 This patch also handles performing of self-heal with shd-pid. Also performs the healing with this->itable's inode rather than main itable. >BUG: 1337405 >Change-Id: Id657a6623b71998b027b1dff6af5bbdf8cab09c9 >Signed-off-by: Pranith Kumar K >Reviewed-on: http://review.gluster.org/14422 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: Krutika Dhananjay BUG: 1337870 Change-Id: Ifb476eeed2ff73a44e481d64074599ab0707c725 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/14455 Smoke: Gluster Build System Reviewed-by: Krutika Dhananjay NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos --- xlators/cluster/afr/src/afr-common.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index d7bc3e29ee2..2043e11d1e8 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1957,13 +1957,9 @@ afr_lookup_sh_metadata_wrap (void *opaque) if (first == -1) goto out; - inode = inode_link (local->inode, NULL, NULL, &replies[first].poststat); - if(!inode) + if (afr_selfheal_metadata_by_stbuf (this, &replies[first].poststat)) goto out; - afr_selfheal_metadata (frame, this, inode); - inode_unref (inode); - afr_local_replies_wipe (local, this->private); dict = dict_new (); -- cgit