summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-09-06 18:20:39 +0530
committerVijay Bellur <vijay@gluster.com>2012-09-07 10:44:34 +0530
commit7ed72a4fd16c54ed8fd49dff7db5ac1c15311414 (patch)
treef5b91ba332d55b388a4e5e7ef99d31964ff85f25 /libglusterfs/src/fd.c
parentae9ea44760e5a5f3bba0f19072e3f654a52be9f2 (diff)
core/statedump: statedump enahancements
* append timestamp to the statedump filename to prevent old files getting over written * Add start and end markers to statedump to indicate beginning and finishing of statedump information * Make glusterfs take options through /tmp/glusterdump.options file and treating those options with higher prioriry * do not dump the entire inode table in the statedump. Instead just dump the ltable and the fdtable Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'libglusterfs/src/fd.c')
-rw-r--r--libglusterfs/src/fd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index b0b75a5ad3e..aafda5ecc27 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -960,6 +960,13 @@ fd_dump (fd_t *fd, char *prefix)
gf_proc_dump_write("pid", "%llu", fd->pid);
gf_proc_dump_write("refcount", "%d", fd->refcount);
gf_proc_dump_write("flags", "%d", fd->flags);
+
+ if (fd->inode) {
+ gf_proc_dump_build_key (key, "inode", NULL);
+ gf_proc_dump_add_section(key);
+ inode_dump (fd->inode, key);
+ }
+
}