summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorXie Changlong <xiechanglong@cmss.chinamobile.com>2019-06-03 15:59:38 +0800
committerAmar Tumballi <amarts@redhat.com>2019-06-14 04:28:05 +0000
commit928395eddf4241433effc55e294a7996108da7d8 (patch)
treee35c341254153a8d3b58d7a70280fb336090a6fd /xlators
parent675dd98ce0c772b732c7f45a8e51dcf0d64f57fc (diff)
gnfs: support inode dump
So, we will get more debug info. fixes: #679 Change-Id: I3588e204ad25c20b69271c1a4ee17d0d158bd794 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/server/src/nfs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index ebded415c38..aef88acc37b 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -31,6 +31,7 @@
#include <glusterfs/syscall.h>
#include "rpcsvc.h"
#include "nfs-messages.h"
+#include "glusterfs/statedump.h"
#define OPT_SERVER_AUX_GIDS "nfs.server-aux-gids"
#define OPT_SERVER_GID_CACHE_TIMEOUT "nfs.server.aux-gid-timeout"
@@ -1667,6 +1668,20 @@ out:
return ret;
}
+int32_t
+nfs_itable_dump(xlator_t *this)
+{
+ if (!this)
+ return -1;
+
+ if (this->next && this->next->itable) {
+ gf_proc_dump_add_section("xlator.nfs.itable");
+ inode_table_dump(this->next->itable, "xlator.nfs.itable");
+ }
+
+ return 0;
+}
+
struct xlator_cbks cbks = {
.forget = nfs_forget,
};
@@ -1676,6 +1691,7 @@ struct xlator_fops fops;
struct xlator_dumpops dumpops = {
.priv = nfs_priv,
.priv_to_dict = nfs_priv_to_dict,
+ .inode = nfs_itable_dump,
};
/* TODO: If needed, per-volume options below can be extended to be export