diff options
| author | Kotresh HR <khiremat@redhat.com> | 2017-07-16 15:16:56 -0400 | 
|---|---|---|
| committer | Krutika Dhananjay <kdhananj@redhat.com> | 2017-07-28 05:21:46 +0000 | 
| commit | ab2558a3e7a1b2de2d63a3812ab4ed58d10d8619 (patch) | |
| tree | 8f0baa0697c37abd5a113334e6452138d8a7a5c0 /libglusterfs/src | |
| parent | 1477fa442a733d7b1a5ea74884cac8f29fbe7e6a (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 <khiremat@redhat.com>
Reviewed-on: https://review.gluster.org/17785
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'libglusterfs/src')
| -rw-r--r-- | libglusterfs/src/glusterfs.h | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index fd659293504..bb925c3d78d 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -121,6 +121,7 @@  #define GF_XATTR_LINKINFO_KEY   "trusted.distribute.linkinfo"  #define GFID_XATTR_KEY          "trusted.gfid"  #define PGFID_XATTR_KEY_PREFIX  "trusted.pgfid." +#define GFID2PATH_VIRT_XATTR_KEY  "glusterfs.gfidtopath"  #define GFID2PATH_XATTR_KEY_PREFIX  "trusted.gfid2path."  #define GFID2PATH_XATTR_KEY_PREFIX_LENGTH 18  #define VIRTUAL_GFID_XATTR_KEY_STR  "glusterfs.gfid.string"  | 
