diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-05-15 10:54:43 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:22 -0400 |
commit | 20bceecb3159bbe06a26fc6747457d9de02ec227 (patch) | |
tree | 19d2b024b5aa994eabad46adead2a7f7719305db /fs/bcachefs/migrate.c | |
parent | 7d825866604b34ba02b4c286c6fd6d232fd06cd0 (diff) | |
download | linux-stable-20bceecb3159bbe06a26fc6747457d9de02ec227.tar.gz linux-stable-20bceecb3159bbe06a26fc6747457d9de02ec227.tar.bz2 linux-stable-20bceecb3159bbe06a26fc6747457d9de02ec227.zip |
bcachefs: More work to avoid transaction restarts
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/migrate.c')
-rw-r--r-- | fs/bcachefs/migrate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c index 6b17d7918aa4..ad41f5e36a7c 100644 --- a/fs/bcachefs/migrate.c +++ b/fs/bcachefs/migrate.c @@ -42,8 +42,7 @@ static int bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags) BKEY_PADDED(key) tmp; int ret = 0; - bch2_trans_init(&trans, c); - bch2_trans_preload_iters(&trans); + bch2_trans_init(&trans, c, BTREE_ITER_MAX, 0); iter = bch2_trans_get_iter(&trans, BTREE_ID_EXTENTS, POS_MIN, BTREE_ITER_PREFETCH); @@ -113,7 +112,7 @@ static int bch2_dev_metadata_drop(struct bch_fs *c, unsigned dev_idx, int flags) if (flags & BCH_FORCE_IF_METADATA_LOST) return -EINVAL; - bch2_trans_init(&trans, c); + bch2_trans_init(&trans, c, 0, 0); closure_init_stack(&cl); for (id = 0; id < BTREE_ID_NR; id++) { |