summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src/gfid-access.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.c')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index a5869f82187..399780d616d 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -15,6 +15,7 @@
#include "gfid-access.h"
#include "inode.h"
#include "byte-order.h"
+#include "statedump.h"
int
@@ -1381,6 +1382,25 @@ fini (xlator_t *this)
return;
}
+int32_t
+ga_dump_inodectx (xlator_t *this, inode_t *inode)
+{
+ int ret = -1;
+ uint64_t value = 0;
+ inode_t *tmp_inode = NULL;
+ char key_prefix[GF_DUMP_MAX_BUF_LEN] = {0, };
+
+ ret = inode_ctx_get (inode, this, &value);
+ if (ret == 0) {
+ tmp_inode = (void*) value;
+ gf_proc_dump_build_key (key_prefix, this->name, "inode");
+ gf_proc_dump_add_section (key_prefix);
+ gf_proc_dump_write ("real-gfid", "%s",
+ uuid_utoa (tmp_inode->gfid));
+ }
+
+ return 0;
+}
struct xlator_fops fops = {
.lookup = ga_lookup,
@@ -1410,6 +1430,10 @@ struct xlator_cbks cbks = {
.forget = ga_forget,
};
+struct xlator_dumpops dumpops = {
+ .inodectx = ga_dump_inodectx,
+};
+
struct volume_options options[] = {
/* This translator doesn't take any options, or provide any options */
{ .key = {NULL} },