diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-19 14:32:23 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:58 -0400 |
commit | d59ca7e8c072b4587113ced8e00358368f315626 (patch) | |
tree | 0e0396f70eb6b8ca271dcdba431a0542752a6de6 | |
parent | 330970c2c61686b43cfef47ab99a84f659271ede (diff) | |
download | linux-stable-d59ca7e8c072b4587113ced8e00358368f315626.tar.gz linux-stable-d59ca7e8c072b4587113ced8e00358368f315626.tar.bz2 linux-stable-d59ca7e8c072b4587113ced8e00358368f315626.zip |
bcachefs: verify_bucket_evacuated() -> set_btree_iter_dontneed()
This should help with excessive 'would deadlock' transaction restarts.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/move.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index d94cefec9880..ff4a74de728d 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -629,6 +629,8 @@ void bch2_verify_bucket_evacuated(struct btree_trans *trans, struct bpos bucket, u64 bp_offset = 0; int ret; + bch2_trans_begin(trans); + bch2_trans_iter_init(trans, &iter, BTREE_ID_alloc, bucket, BTREE_ITER_CACHED); again: @@ -649,6 +651,7 @@ again: } } + set_btree_iter_dontneed(&iter); bch2_trans_iter_exit(trans, &iter); return; failed_to_evacuate: |