summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/common.h
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-12-15 17:38:05 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-24 05:13:50 -0800
commit728de5be7ce2975efb59bb5928fd7261d5ec7760 (patch)
treee550eb5cddefc1d639b9c973fde71e72c6915649 /xlators/features/locks/src/common.h
parent88c6c11813cbd60a6b8e5ec4e2edd40e326ac311 (diff)
locks: Made dump locks formatting more 'readable'.
Also, Added inode's path to dump locks. Added basename to entrylk dump output. Added whence field of range locks to dump output. Change-Id: Ifd3f8b585a52de7ff68cd54506619ac3eaedeecc BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/features/locks/src/common.h')
-rw-r--r--xlators/features/locks/src/common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/features/locks/src/common.h b/xlators/features/locks/src/common.h
index 0c0dd22e7ca..a8e1d3d424c 100644
--- a/xlators/features/locks/src/common.h
+++ b/xlators/features/locks/src/common.h
@@ -21,6 +21,22 @@
#define __COMMON_H__
#include "lkowner.h"
+/*dump locks format strings */
+#define RANGE_FMT "type=%s, whence=%hd, start=%llu, len=%llu"
+#define ENTRY_FMT "type=%s on basename=%s"
+#define DUMP_GEN_FMT "pid = %llu, owner=%s, transport=%p, "
+#define GRNTD_AT "granted at %s"
+#define BLKD_AT "blocked at %s"
+#define DUMP_BLKD_FMT DUMP_GEN_FMT", "BLKD_AT
+#define DUMP_GRNTD_FMT DUMP_GEN_FMT", "GRNTD_AT
+#define DUMP_BLKD_GRNTD_FMT DUMP_GEN_FMT", "BLKD_AT", "GRNTD_AT
+#define ENTRY_BLKD_FMT ENTRY_FMT", "DUMP_BLKD_FMT
+#define ENTRY_GRNTD_FMT ENTRY_FMT", "DUMP_GRNTD_FMT
+#define ENTRY_BLKD_GRNTD_FMT ENTRY_FMT", "DUMP_BLKD_GRNTD_FMT
+
+#define RANGE_BLKD_FMT RANGE_FMT", "DUMP_BLKD_FMT
+#define RANGE_GRNTD_FMT RANGE_FMT", "DUMP_GRNTD_FMT
+#define RANGE_BLKD_GRNTD_FMT RANGE_FMT", "DUMP_BLKD_GRNTD_FMT
#define SET_FLOCK_PID(flock, lock) ((flock)->l_pid = lock->client_pid)
posix_lock_t *