summaryrefslogtreecommitdiff
path: root/fs/bcachefs/trace.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-08-21 23:08:53 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:39 -0400
commite3738c6909d69e980d8b56d33df2e438a2c1c798 (patch)
treee2b2b42ed3b76430627259f6566f12d907d9cd90 /fs/bcachefs/trace.h
parent2e27f6567b2662a2f7440a651e007ebc77cdcc7a (diff)
six locks: Improve six_lock_count
six_lock_count now counts up whether a write lock held, and this patch now also correctly counts six_lock->intent_lock_recurse. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r--fs/bcachefs/trace.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h
index 9353191c4fc8..db05be59fa35 100644
--- a/fs/bcachefs/trace.h
+++ b/fs/bcachefs/trace.h
@@ -453,11 +453,11 @@ TRACE_EVENT(btree_node_upgrade_fail,
__entry->locked = btree_node_locked(path, level);
c = bch2_btree_node_lock_counts(trans, NULL, path->l[level].b, level),
- __entry->self_read_count = c.read;
- __entry->self_intent_count = c.intent;
+ __entry->self_read_count = c.n[SIX_LOCK_read];
+ __entry->self_intent_count = c.n[SIX_LOCK_intent];
c = six_lock_counts(&path->l[level].b->c.lock);
- __entry->read_count = c.read;
- __entry->intent_count = c.intent;
+ __entry->read_count = c.n[SIX_LOCK_read];
+ __entry->intent_count = c.n[SIX_LOCK_read];
),
TP_printk("%s %pS btree %s pos %llu:%llu:%u, locked %u held %u:%u lock count %u:%u",