summaryrefslogtreecommitdiffstats
path: root/fs/dlm/debug_fs.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2008-12-09 14:12:21 -0600
committerDavid Teigland <teigland@redhat.com>2008-12-23 10:18:17 -0600
commiteeda418d8c2646f33f24e9ad33d86c239adc6de7 (patch)
treefecfb293e62cc043d57535481913b37347006a4c /fs/dlm/debug_fs.c
parentfd22a51bcc0b7b76fc729b02316214fd979f9fe1 (diff)
downloadlinux-eeda418d8c2646f33f24e9ad33d86c239adc6de7.tar.bz2
dlm: change lock time stamping
Use ktime instead of jiffies for timestamping lkb's. Also stamp the time on every lkb whenever it's added to a resource queue, instead of just stamping locks subject to timeouts. This will allow us to use timestamps more widely for debugging all locks. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/debug_fs.c')
-rw-r--r--fs/dlm/debug_fs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index 8fc24f4507a3..19e4f9eb44e1 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -162,21 +162,21 @@ static int print_resource(struct dlm_rsb *res, struct seq_file *s)
static void print_lock(struct seq_file *s, struct dlm_lkb *lkb, struct dlm_rsb *r)
{
- unsigned int waiting = 0;
- uint64_t xid = 0;
+ u64 xid = 0;
+ u64 us;
if (lkb->lkb_flags & DLM_IFL_USER) {
if (lkb->lkb_ua)
xid = lkb->lkb_ua->xid;
}
- if (lkb->lkb_timestamp)
- waiting = jiffies_to_msecs(jiffies - lkb->lkb_timestamp);
+ /* microseconds since lkb was added to current queue */
+ us = ktime_to_us(ktime_sub(ktime_get(), lkb->lkb_timestamp));
- /* id nodeid remid pid xid exflags flags sts grmode rqmode time_ms
+ /* id nodeid remid pid xid exflags flags sts grmode rqmode time_us
r_nodeid r_len r_name */
- seq_printf(s, "%x %d %x %u %llu %x %x %d %d %d %u %u %d \"%s\"\n",
+ seq_printf(s, "%x %d %x %u %llu %x %x %d %d %d %llu %u %d \"%s\"\n",
lkb->lkb_id,
lkb->lkb_nodeid,
lkb->lkb_remid,
@@ -187,7 +187,7 @@ static void print_lock(struct seq_file *s, struct dlm_lkb *lkb, struct dlm_rsb *
lkb->lkb_status,
lkb->lkb_grmode,
lkb->lkb_rqmode,
- waiting,
+ (unsigned long long)us,
r->res_nodeid,
r->res_length,
r->res_name);