From 9fd8f212bc1f6031b9ad7eaaf014d39916881947 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 15 Sep 2009 04:47:50 +0000 Subject: Dumop inodectx added Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213 --- xlators/features/locks/src/posix.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'xlators/features/locks/src/posix.c') diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 71098be5e..5514d4414 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 = { -- cgit