From 767c5197477639c9a185fbd208a00a43c03e3ef9 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 24 Mar 2016 20:43:05 +0530 Subject: [PATCH 43/80] debug/trace: Print {acm}times as integers Backport of: http://review.gluster.org/#/c/13826/ release-3.7 patch: http://review.gluster.org/13844 This helps in debugging issues with mtime, ctime etc. Change-Id: I075e89ad245c246f5d42aa185a19c5885797cb66 BUG: 1298724 Signed-off-by: Krutika Dhananjay Reviewed-on: https://code.engineering.redhat.com/gerrit/71398 Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- xlators/debug/trace/src/trace.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c index 5bbd07a..c809254 100644 --- a/xlators/debug/trace/src/trace.c +++ b/xlators/debug/trace/src/trace.c @@ -38,19 +38,19 @@ trace_stat_to_str(struct iatt *buf, char *str, size_t len) gf_time_fmt (ctime_buf, sizeof ctime_buf, buf->ia_ctime, gf_timefmt_dirent); - snprintf (str, len, - "gfid=%s ino=%"PRIu64", mode=%o, " - "nlink=%"GF_PRI_NLINK", uid=%u, " - "gid=%u, size=%"PRIu64", " - "blocks=%"PRIu64", atime=%s, " - "mtime=%s, ctime=%s", - uuid_utoa (buf->ia_gfid), - buf->ia_ino, - st_mode_from_ia (buf->ia_prot, buf->ia_type), - buf->ia_nlink, buf->ia_uid, - buf->ia_gid, buf->ia_size, - buf->ia_blocks, atime_buf, - mtime_buf, ctime_buf); + snprintf (str, len, "gfid=%s ino=%"PRIu64", mode=%o, " + "nlink=%"GF_PRI_NLINK", uid=%u, gid=%u, size=%"PRIu64", " + "blocks=%"PRIu64", atime=%s mtime=%s ctime=%s " + "atime_sec=%"PRIu32", atime_nsec=%"PRIu32"," + " mtime_sec=%"PRIu32", mtime_nsec=%"PRIu32", " + "ctime_sec=%"PRIu32", ctime_nsec=%"PRIu32"", + uuid_utoa (buf->ia_gfid), buf->ia_ino, + st_mode_from_ia (buf->ia_prot, buf->ia_type), buf->ia_nlink, + buf->ia_uid, buf->ia_gid, buf->ia_size, buf->ia_blocks, + atime_buf, mtime_buf, ctime_buf, + buf->ia_atime, buf->ia_atime_nsec, + buf->ia_mtime, buf->ia_mtime_nsec, + buf->ia_ctime, buf->ia_ctime_nsec); } -- 1.7.1