summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.h
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-07-16 15:16:56 -0400
committerShyamsundar Ranganathan <srangana@redhat.com>2017-07-31 15:45:02 +0000
commit32e366bad947926343fdb389f054ca3051e44774 (patch)
tree4e9da129dc25bcd826e1d4f9041343c338691fee /xlators/storage/posix/src/posix.h
parent61ea2a44b509cebc566fc18b2c356d88a3f1fdc8 (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> Updates: #139 Change-Id: Ie3b0c3fd8bd5333c4a27410011e608333918c02a Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17921 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r--xlators/storage/posix/src/posix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
index 81158266111..81ea3d0f0b8 100644
--- a/xlators/storage/posix/src/posix.h
+++ b/xlators/storage/posix/src/posix.h
@@ -161,6 +161,7 @@ struct posix_private {
uint32_t batch_fsync_delay_usec;
gf_boolean_t update_pgfid_nlinks;
gf_boolean_t gfid2path;
+ char gfid2path_sep[8];
/* seconds to sleep between health checks */
uint32_t health_check_interval;
@@ -281,6 +282,9 @@ posix_get_ancestry (xlator_t *this, inode_t *leaf_inode,
dict_t *xdata);
int
posix_handle_georep_xattrs (call_frame_t *, const char *, int *, gf_boolean_t);
+int32_t
+posix_resolve_dirgfid_to_path (const uuid_t dirgfid, const char *brick_path,
+ const char *bname, char **path);
void
posix_gfid_unset (xlator_t *this, dict_t *xdata);