From 9662504d45f3e285772f5188a7edf7ae3665cc6a Mon Sep 17 00:00:00 2001 From: karthik-us Date: Tue, 4 Dec 2018 11:19:27 +0530 Subject: cluster/afr: Allow lookup on root if it is from ADD_REPLICA_MOUNT Problem: When trying to convert a plain distribute volume to replica-3 or arbiter type it is failing with ENOTCONN error as the lookup on the root will fail as there is no quorum. Fix: Allow lookup on root if it is coming from the ADD_REPLICA_MOUNT which is used while adding bricks to a volume. It will try to set the pending xattrs for the newly added bricks to allow the heal to happen in the right direction and avoid data loss scenarios. Note: This fix will solve the problem of type conversion only in the case where the volume was mounted at least once. The conversion of non mounted volumes will still fail since the dht selfheal tries to set the directory layout will fail as they do that with the PID GF_CLIENT_PID_NO_ROOT_SQUASH set in the frame->root. Change-Id: Ic511939981dad118cc946754341318b164954b3b fixes: bz#1655854 Signed-off-by: karthik-us --- libglusterfs/src/glusterfs/common-utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h index 55d8f8cc931..76d1e5feee5 100644 --- a/libglusterfs/src/glusterfs/common-utils.h +++ b/libglusterfs/src/glusterfs/common-utils.h @@ -169,7 +169,8 @@ enum _gf_special_pid { GF_CLIENT_PID_BITD = -8, GF_CLIENT_PID_SCRUB = -9, GF_CLIENT_PID_TIER_DEFRAG = -10, - GF_SERVER_PID_TRASH = -11 + GF_SERVER_PID_TRASH = -11, + GF_CLIENT_PID_ADD_REPLICA_MOUNT = -12 }; enum _gf_xlator_ipc_targets { -- cgit