summaryrefslogtreecommitdiff
path: root/fs/bcachefs/trace.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-02-18 00:47:45 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:24 -0400
commit8f9ad91a02c4fd1391ce852cadd9a0227fdd624a (patch)
tree179397fe5647fc5ea9ada7c5db34809e5e8be433 /fs/bcachefs/trace.h
parentbf7e49a4ae564108d08d314e514a6f802748d73b (diff)
downloadlwn-8f9ad91a02c4fd1391ce852cadd9a0227fdd624a.tar.gz
lwn-8f9ad91a02c4fd1391ce852cadd9a0227fdd624a.zip
bcachefs: Fix failure to allocate btree node in cache
The error code when we fail to allocate a node in the btree node cache doesn't make it to bch2_btree_path_traverse_all(). Instead, we need to stash a flag in btree_trans so we know we have to take the cannibalize lock. 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, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h
index 64b7d9364fd9..b35022dc66c2 100644
--- a/fs/bcachefs/trace.h
+++ b/fs/bcachefs/trace.h
@@ -802,6 +802,14 @@ DEFINE_EVENT(transaction_restart_iter, trans_restart_traverse,
TP_ARGS(trans_fn, caller_ip, btree_id, pos)
);
+DEFINE_EVENT(transaction_restart_iter, trans_restart_memory_allocation_failure,
+ TP_PROTO(const char *trans_fn,
+ unsigned long caller_ip,
+ enum btree_id btree_id,
+ struct bpos *pos),
+ TP_ARGS(trans_fn, caller_ip, btree_id, pos)
+);
+
TRACE_EVENT(trans_restart_would_deadlock,
TP_PROTO(const char *trans_fn,
unsigned long caller_ip,