path: root/tests/volume.rc
diff options
authorKotresh HR <>2017-07-16 15:16:56 -0400
committerKrutika Dhananjay <>2017-07-28 05:21:46 +0000
commitab2558a3e7a1b2de2d63a3812ab4ed58d10d8619 (patch)
tree8f0baa0697c37abd5a113334e6452138d8a7a5c0 /tests/volume.rc
parent1477fa442a733d7b1a5ea74884cac8f29fbe7e6a (diff)
storage/posix: Add virtual xattr to fetch path from gfid
The gfid2path infra stores the "pargfid/bname" as on xattr value for each non directory entry. Hardlinks would have a separate xattr. This xattr key is internal and is not exposed to applications. A virtual xattr is exposed for the applications to fetch the path from gfid. Internal xattr: trusted.gfid2path.<xxhash> Virtual xattr: glusterfs.gfidtopath getfattr -h -n glusterfs.gfidtopath /<aux-mnt>/.gfid/<gfid> If there are hardlinks, it returns all the paths separated by ':'. A volume set option is introduced to change the delimiter to required string of max length 7. gluster vol set gfid2path-separator ":::" Updates: #139 Change-Id: Ie3b0c3fd8bd5333c4a27410011e608333918c02a Signed-off-by: Kotresh HR <> Reviewed-on: Smoke: Gluster Build System <> CentOS-regression: Gluster Build System <> Reviewed-by: Krutika Dhananjay <>
Diffstat (limited to 'tests/volume.rc')
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 402bb9d..369e5a7 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -359,6 +359,11 @@ function get_text_xattr {
getfattr -h -d -m. -e text $path 2>/dev/null | grep -a $key | cut -f2 -d'='
+function get_gfid2path {
+ local path=$1
+ getfattr -h --only-values -n glusterfs.gfidtopath $path 2>/dev/null
function get_xattr_key {
local key=$1
local path=$2