diff options
| author | shishir gowda <shishirng@gluster.com> | 2012-03-27 12:50:59 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vijay@gluster.com> | 2012-04-01 06:16:31 -0700 | 
| commit | ca4d7c9dfc1d7f8c09994a862868f55b8320eb95 (patch) | |
| tree | 62061abca13bdc8c9fe0af6a047cdb431035b4ca /xlators/performance | |
| parent | c2dd1510e18e4c91d54ce4de91ecd47b408524dd (diff) | |
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 <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3014
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/performance')
| -rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 14 | 
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 42ec584ba..bc8c7659f 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);          }  | 
