diff options
Diffstat (limited to 'libbcachefs/data_update.c')
-rw-r--r-- | libbcachefs/data_update.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libbcachefs/data_update.c b/libbcachefs/data_update.c index b75ff07e..be45cf54 100644 --- a/libbcachefs/data_update.c +++ b/libbcachefs/data_update.c @@ -97,7 +97,7 @@ static void bch2_bkey_mark_dev_cached(struct bkey_s k, unsigned dev) ptr->cached = true; } -static int bch2_data_update_index_update(struct bch_write_op *op) +int bch2_data_update_index_update(struct bch_write_op *op) { struct bch_fs *c = op->c; struct btree_trans trans; @@ -225,7 +225,7 @@ static int bch2_data_update_index_update(struct bch_write_op *op) bch2_trans_update(&trans, &iter, insert, BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?: bch2_trans_commit(&trans, &op->res, - op_journal_seq(op), + NULL, BTREE_INSERT_NOFAIL| m->data_opts.btree_insert_flags); if (!ret) { @@ -270,8 +270,7 @@ out: } void bch2_data_update_read_done(struct data_update *m, - struct bch_extent_crc_unpacked crc, - struct closure *cl) + struct bch_extent_crc_unpacked crc) { /* write bio must own pages: */ BUG_ON(!m->op.wbio.bio.bi_vcnt); @@ -279,7 +278,7 @@ void bch2_data_update_read_done(struct data_update *m, m->op.crc = crc; m->op.wbio.bio.bi_iter.bi_size = crc.compressed_size << 9; - closure_call(&m->op.cl, bch2_write, NULL, cl); + closure_call(&m->op.cl, bch2_write, NULL, NULL); } void bch2_data_update_exit(struct data_update *update) @@ -317,14 +316,13 @@ int bch2_data_update_init(struct bch_fs *c, struct data_update *m, m->op.flags |= BCH_WRITE_PAGES_STABLE| BCH_WRITE_PAGES_OWNED| BCH_WRITE_DATA_ENCODED| - BCH_WRITE_FROM_INTERNAL| + BCH_WRITE_MOVE| m->data_opts.write_flags; m->op.compression_type = bch2_compression_opt_to_type[io_opts.background_compression ?: io_opts.compression]; if (m->data_opts.btree_insert_flags & BTREE_INSERT_USE_RESERVE) m->op.alloc_reserve = RESERVE_movinggc; - m->op.index_update_fn = bch2_data_update_index_update; i = 0; bkey_for_each_ptr_decode(k.k, ptrs, p, entry) { |