summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_iter.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-01-05 05:34:41 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:48 +0300
commit9d7f2a4111be34eac6b23ed62271efb12f36815f (patch)
tree023481772142b7a3b93f31b2f602bf5ecf1b0f4c /fs/bcachefs/btree_iter.c
parent2cc9c0db89f7b6e3c3218ddaa7964055af8d95af (diff)
downloadlinux-9d7f2a4111be34eac6b23ed62271efb12f36815f.tar.xz
bcachefs: bch2_btree_trans_to_text(): print blocked time
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r--fs/bcachefs/btree_iter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index 669d2b0b384a..326742e00159 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -3076,7 +3076,9 @@ void bch2_btree_trans_to_text(struct printbuf *out, struct btree_trans *trans)
b = READ_ONCE(trans->locking);
if (b) {
- prt_str(out, " want");
+ prt_printf(out, " blocked for %lluus on",
+ div_u64(local_clock() - trans->locking_wait.start_time,
+ 1000));
prt_newline(out);
prt_printf(out, " %c", lock_types[trans->locking_wait.lock_want]);
bch2_btree_bkey_cached_common_to_text(out, b);