diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/inode.c | 15 | ||||
-rw-r--r-- | libglusterfs/src/xlator.h | 3 |
2 files changed, 18 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 diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 2e815af911a..4adbec2e5d8 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -812,11 +812,14 @@ typedef int32_t (*dumpop_inode_t) (xlator_t *this); typedef int32_t (*dumpop_fd_t) (xlator_t *this); +typedef int32_t (*dumpop_inodectx_t) (xlator_t *this, inode_t *ino); + struct xlator_dumpops { dumpop_priv_t priv; dumpop_inode_t inode; dumpop_fd_t fd; + dumpop_inodectx_t inodectx; }; typedef struct xlator_list { |