diff options
author | karthik-us <ksubrahm@redhat.com> | 2018-12-04 11:19:27 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2018-12-18 10:30:19 +0000 |
commit | 9662504d45f3e285772f5188a7edf7ae3665cc6a (patch) | |
tree | 5541bccdb72488711a21d9604ef90afbd91bf23b /libglusterfs | |
parent | b87c397091bac6a4a6dec4e45a7671fad4a11770 (diff) |
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 <ksubrahm@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs/common-utils.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |