summaryrefslogtreecommitdiffstats
path: root/xlators/features
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 /xlators/features
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 'xlators/features')
-rw-r--r--xlators/features/locks/src/posix.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 71098be5e13..5514d441495 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -769,32 +769,34 @@ pl_forget (xlator_t *this,
}
-void
-pl_dump_inode_priv (inode_t *inode)
+int32_t
+pl_dump_inode_priv (xlator_t *this, inode_t *inode)
{
- int ret = -1;
- uint64_t tmp_pl_inode = 0;
- pl_inode_t *pl_inode = NULL;
- char key[GF_DUMP_MAX_BUF_LEN];
+ int ret = -1;
+ uint64_t tmp_pl_inode = 0;
+ pl_inode_t *pl_inode = NULL;
+ char key[GF_DUMP_MAX_BUF_LEN];
if (!inode)
- return;
+ return -1;
- ret = inode_ctx_get (inode, inode->table->xl, &tmp_pl_inode);
+ ret = inode_ctx_get (inode, this, &tmp_pl_inode);
if (ret != 0)
- return;
+ return ret;
pl_inode = (pl_inode_t *)(long)tmp_pl_inode;
if (!pl_inode)
- return;
+ return -1;
gf_proc_dump_build_key(key,
"xlator.feature.locks.inode",
- "%ld.%s",inode->ino, "mandatory");
+ "%ld.mandatory",inode->ino);
gf_proc_dump_write(key, "%d", pl_inode->mandatory);
+
+ return 0;
}
@@ -916,7 +918,7 @@ struct xlator_mops mops = {
};
struct xlator_dumpops dumpops = {
- .inode = pl_dump_inode,
+ .inodectx = pl_dump_inode_priv,
};
struct xlator_cbks cbks = {