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/move.c | |
parent | 7d825866604b34ba02b4c286c6fd6d232fd06cd0 (diff) | |
download | lwn-20bceecb3159bbe06a26fc6747457d9de02ec227.tar.gz lwn-20bceecb3159bbe06a26fc6747457d9de02ec227.zip |
bcachefs: More work to avoid transaction restarts
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r-- | fs/bcachefs/move.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 64ac8244e1e0..96f9f5950438 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -61,8 +61,7 @@ static int bch2_migrate_index_update(struct bch_write_op *op) struct keylist *keys = &op->insert_keys; 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, bkey_start_pos(&bch2_keylist_front(keys)->k), @@ -499,7 +498,7 @@ int bch2_move_data(struct bch_fs *c, INIT_LIST_HEAD(&ctxt.reads); init_waitqueue_head(&ctxt.wait); - bch2_trans_init(&trans, c); + bch2_trans_init(&trans, c, 0, 0); stats->data_type = BCH_DATA_USER; stats->btree_id = BTREE_ID_EXTENTS; @@ -633,7 +632,7 @@ static int bch2_move_btree(struct bch_fs *c, enum data_cmd cmd; int ret = 0; - bch2_trans_init(&trans, c); + bch2_trans_init(&trans, c, 0, 0); stats->data_type = BCH_DATA_BTREE; |