summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-09-15 04:47:50 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-16 07:11:37 -0700
commit9fd8f212bc1f6031b9ad7eaaf014d39916881947 (patch)
tree788a6950630ee1df028c9d5cddecee038fe9fc49 /libglusterfs/src/inode.c
parentdcfc4bdd5962ad18665d9ad3f3309884c941845e (diff)
Dumop inodectx added
Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 06f742cc625..ff65d101ec3 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -1213,6 +1213,8 @@ inode_dump (inode_t *inode, char *prefix)
{
char key[GF_DUMP_MAX_BUF_LEN];
int ret = -1;
+ xlator_t *xl = NULL;
+ int i = 0;
if (!inode)
return;
@@ -1236,6 +1238,19 @@ inode_dump (inode_t *inode, char *prefix)
gf_proc_dump_build_key(key, prefix, "st_mode");
gf_proc_dump_write(key, "%d", inode->st_mode);
UNLOCK(&inode->lock);
+ if (!inode->_ctx)
+ goto out;
+
+ for (i = 0; i < inode->table->xl->ctx->xl_count; i++) {
+ if (inode->_ctx[i].key) {
+ xl = (xlator_t *)(long)inode->_ctx[i].key;
+ if (xl->dumpops && xl->dumpops->inodectx)
+ xl->dumpops->inodectx (xl, inode);
+ }
+ }
+
+out:
+ return;
}
void