summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2012-03-10 17:22:55 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-11 23:52:11 -0700
commit152a0194e736e073d96fedd980b976cc1f1d4df8 (patch)
tree6e6a631ec2dc9aef56b6b37964170def71f4d938 /xlators/cluster/dht/src/dht.c
parent7157a2cf42c4cf7c2ec2805e0732b49ebabd975e (diff)
Print non-zero timestamps in statedumpv3.3.0qa27
Change-Id: I686842bc0934128b825828066f613c2a6280ceb9 BUG: 801689 Reviewed-on: http://review.gluster.com/2912 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/cluster/dht/src/dht.c')
-rw-r--r--xlators/cluster/dht/src/dht.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c
index 96382bf16e0..f73600d7bb8 100644
--- a/xlators/cluster/dht/src/dht.c
+++ b/xlators/cluster/dht/src/dht.c
@@ -144,7 +144,10 @@ dht_priv_dump (xlator_t *this)
conf->du_stats->avail_inodes);
gf_proc_dump_write("du_stats.log", "%lu", conf->du_stats->log);
}
- gf_proc_dump_write("last_stat_fetch", "%s", ctime(&conf->last_stat_fetch.tv_sec));
+
+ if (conf->last_stat_fetch.tv_sec)
+ gf_proc_dump_write("last_stat_fetch", "%s",
+ ctime(&conf->last_stat_fetch.tv_sec));
UNLOCK(&conf->subvolume_lock);