summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-gfid-path.h
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-06-29 05:45:34 -0400
committerJeff Darcy <jeff@pl.atyp.us>2017-07-10 14:51:14 +0000
commita62b16b72b03f2b7c25c24ea9ac5968453a92009 (patch)
tree7521978a597377f082172a2b5454e83bbab02bbf /xlators/storage/posix/src/posix-gfid-path.h
parent9156a743aa76c955d18c9bfcb7c1a38ba00da890 (diff)
storage/posix: New gfid2path infra
With this infra, a new xattr is stored on each entry creation as below. trusted.gfid2path.<xxhash> = <pargfid>/<basename> If there are hardlinks, multiple xattrs would be present. Fops which are impacted: create, mknod, link, symlink, rename, unlink Option to enable: gluster vol set <VOLNAME> storage.gfid2path on Updates: #139 Change-Id: I369974cd16703c45ee87f82e6c2ff5a987a6cc6a Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17488 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-gfid-path.h')
-rw-r--r--xlators/storage/posix/src/posix-gfid-path.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-gfid-path.h b/xlators/storage/posix/src/posix-gfid-path.h
new file mode 100644
index 0000000..dbe0c59
--- /dev/null
+++ b/xlators/storage/posix/src/posix-gfid-path.h
@@ -0,0 +1,25 @@
+/*
+ Copyright (c) 2017 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+
+ This file is licensed to you under your choice of the GNU Lesser
+ General Public License, version 3 or any later version (LGPLv3 or
+ later), or the GNU General Public License, version 2 (GPLv2), in all
+ cases as published by the Free Software Foundation.
+*/
+
+#ifndef _POSIX_GFID_PATH_H
+#define _POSIX_GFID_PATH_H
+
+#include "xlator.h"
+#include "common-utils.h"
+
+#define MAX_GFID2PATH_LINK_SUP 500
+
+int32_t
+posix_set_gfid2path_xattr (xlator_t *, const char *, uuid_t,
+ const char *);
+int32_t
+posix_remove_gfid2path_xattr (xlator_t *, const char *, uuid_t,
+ const char *);
+#endif /* _POSIX_GFID_PATH_H */