From ca4d7c9dfc1d7f8c09994a862868f55b8320eb95 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 27 Mar 2012 12:50:59 +0530 Subject: performance/io-cache: Enhance state-dump output Along with weight, print uuid and path. If only the inode is cached, only weight, path and uuid will be printed. Change-Id: Ie7567832915319f26c6bab8a34576f6c43be7998 BUG: 806900 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3014 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/performance/io-cache/src/io-cache.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xlators/performance/io-cache') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 42ec584badd..bc8c7659f70 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -37,9 +37,6 @@ int ioc_log2_page_size; uint32_t ioc_get_priority (ioc_table_t *table, const char *path); -uint32_t -ioc_get_priority (ioc_table_t *table, const char *path); - struct volume_options options[]; @@ -1867,13 +1864,22 @@ void ioc_inode_dump (ioc_inode_t *ioc_inode, char *prefix) { - if ((ioc_inode == NULL) || (prefix == NULL)) { + char *path = NULL; + + if ((ioc_inode == NULL) || (prefix == NULL)) { goto out; } ioc_inode_lock (ioc_inode); { gf_proc_dump_write ("inode.weight", "%d", ioc_inode->weight); + inode_path (ioc_inode->inode, NULL, &path); + if (path) { + gf_proc_dump_write ("path", "%s", path); + GF_FREE (path); + } + gf_proc_dump_write ("uuid", "%s", uuid_utoa + (ioc_inode->inode->gfid)); __ioc_cache_dump (ioc_inode, prefix); __ioc_inode_waitq_dump (ioc_inode, prefix); } -- cgit