summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_key_cache.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-09-03 17:18:57 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-09-04 22:28:57 -0400
commitff08733dd298c969aec7c7828095458f73fd5374 (patch)
tree6a2b9fdfa0e617a31aafd823e32e6f00c1dc0b51 /fs/bcachefs/btree_key_cache.c
parent2c95e5357eaf9d786b8894f9fd1d1df9926caec8 (diff)
bcachefs: Add more assertions for locking btree iterators out of orderbtree_path
btree_path_traverse_all() traverses btree iterators in sorted order, and thus shouldn't see transaction restarts due to potential deadlocks - but sometimes we do. This patch adds some more assertions and tracks some more state to help track this down. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_key_cache.c')
-rw-r--r--fs/bcachefs/btree_key_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 2dfa5040d045..938ced36af73 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -296,7 +296,7 @@ retry:
if (!ck)
goto retry;
- mark_btree_node_locked(path, 0, SIX_LOCK_intent);
+ mark_btree_node_locked(trans, path, 0, SIX_LOCK_intent);
path->locks_want = 1;
} else {
enum six_lock_type lock_want = __btree_lock_want(path, 0);
@@ -318,7 +318,7 @@ retry:
goto retry;
}
- mark_btree_node_locked(path, 0, lock_want);
+ mark_btree_node_locked(trans, path, 0, lock_want);
}
path->l[0].lock_seq = ck->c.lock.state.seq;