Lines Matching refs:op

337 static int bch2_write_index_default(struct bch_write_op *op)  in bch2_write_index_default()  argument
339 struct bch_fs *c = op->c; in bch2_write_index_default()
341 struct keylist *keys = &op->insert_keys; in bch2_write_index_default()
346 .subvol = op->subvol, in bch2_write_index_default()
372 ret = bch2_bkey_set_needs_rebalance(c, sk.k, &op->opts) ?: in bch2_write_index_default()
374 &op->res, in bch2_write_index_default()
375 op->new_i_size, &op->i_sectors_delta, in bch2_write_index_default()
376 op->flags & BCH_WRITE_CHECK_ENOSPC); in bch2_write_index_default()
385 bch2_keylist_pop_front(&op->insert_keys); in bch2_write_index_default()
462 struct bch_write_op *op = container_of(cl, struct bch_write_op, cl); in bch2_write_done() local
463 struct bch_fs *c = op->c; in bch2_write_done()
465 EBUG_ON(op->open_buckets.nr); in bch2_write_done()
467 bch2_time_stats_update(&c->times[BCH_TIME_data_write], op->start_time); in bch2_write_done()
468 bch2_disk_reservation_put(c, &op->res); in bch2_write_done()
470 if (!(op->flags & BCH_WRITE_MOVE)) in bch2_write_done()
472 bch2_keylist_free(&op->insert_keys, op->inline_keys); in bch2_write_done()
476 if (op->end_io) in bch2_write_done()
477 op->end_io(op); in bch2_write_done()
480 static noinline int bch2_write_drop_io_error_ptrs(struct bch_write_op *op) in bch2_write_drop_io_error_ptrs() argument
482 struct keylist *keys = &op->insert_keys; in bch2_write_drop_io_error_ptrs()
490 test_bit(ptr->dev, op->failed.d)); in bch2_write_drop_io_error_ptrs()
509 static void __bch2_write_index(struct bch_write_op *op) in __bch2_write_index() argument
511 struct bch_fs *c = op->c; in __bch2_write_index()
512 struct keylist *keys = &op->insert_keys; in __bch2_write_index()
516 if (unlikely(op->flags & BCH_WRITE_IO_ERROR)) { in __bch2_write_index()
517 ret = bch2_write_drop_io_error_ptrs(op); in __bch2_write_index()
525 ret = !(op->flags & BCH_WRITE_MOVE) in __bch2_write_index()
526 ? bch2_write_index_default(op) in __bch2_write_index()
527 : bch2_data_update_index_update(op); in __bch2_write_index()
532 op->written += sectors_start - keylist_sectors(keys); in __bch2_write_index()
535 struct bkey_i *insert = bch2_keylist_front(&op->insert_keys); in __bch2_write_index()
540 op->flags & BCH_WRITE_MOVE ? "move" : "user", in __bch2_write_index()
549 for_each_set_bit(dev, op->failed.d, BCH_SB_MEMBERS_MAX) in __bch2_write_index()
550 bch2_open_bucket_write_error(c, &op->open_buckets, dev); in __bch2_write_index()
552 bch2_open_buckets_put(c, &op->open_buckets); in __bch2_write_index()
556 op->error = ret; in __bch2_write_index()
557 op->flags |= BCH_WRITE_SUBMITTED; in __bch2_write_index()
587 closure_type(op, struct bch_write_op, cl); in CLOSURE_CALLBACK()
588 struct write_point *wp = op->wp; in CLOSURE_CALLBACK()
589 struct workqueue_struct *wq = index_update_wq(op); in CLOSURE_CALLBACK()
592 if ((op->flags & BCH_WRITE_SUBMITTED) && in CLOSURE_CALLBACK()
593 (op->flags & BCH_WRITE_MOVE)) in CLOSURE_CALLBACK()
594 bch2_bio_free_pages_pool(op->c, &op->wbio.bio); in CLOSURE_CALLBACK()
599 list_add_tail(&op->wp_list, &wp->writes); in CLOSURE_CALLBACK()
605 static inline void bch2_write_queue(struct bch_write_op *op, struct write_point *wp) in bch2_write_queue() argument
607 op->wp = wp; in bch2_write_queue()
620 struct bch_write_op *op; in bch2_write_point_do_index_updates() local
624 op = list_first_entry_or_null(&wp->writes, struct bch_write_op, wp_list); in bch2_write_point_do_index_updates()
625 if (op) in bch2_write_point_do_index_updates()
626 list_del(&op->wp_list); in bch2_write_point_do_index_updates()
627 wp_update_state(wp, op != NULL); in bch2_write_point_do_index_updates()
630 if (!op) in bch2_write_point_do_index_updates()
633 op->flags |= BCH_WRITE_IN_WORKER; in bch2_write_point_do_index_updates()
635 __bch2_write_index(op); in bch2_write_point_do_index_updates()
637 if (!(op->flags & BCH_WRITE_SUBMITTED)) in bch2_write_point_do_index_updates()
638 __bch2_write(op); in bch2_write_point_do_index_updates()
640 bch2_write_done(&op->cl); in bch2_write_point_do_index_updates()
647 struct bch_write_op *op = container_of(cl, struct bch_write_op, cl); in bch2_write_endio() local
656 op->pos.inode, in bch2_write_endio()
660 set_bit(wbio->dev, op->failed.d); in bch2_write_endio()
661 op->flags |= BCH_WRITE_IO_ERROR; in bch2_write_endio()
668 set_bit(wbio->dev, op->devs_need_flush->d); in bch2_write_endio()
688 static void init_append_extent(struct bch_write_op *op, in init_append_extent() argument
695 op->pos.offset += crc.uncompressed_size; in init_append_extent()
697 e = bkey_extent_init(op->insert_keys.top); in init_append_extent()
698 e->k.p = op->pos; in init_append_extent()
707 bch2_alloc_sectors_append_ptrs_inlined(op->c, wp, &e->k_i, crc.compressed_size, in init_append_extent()
708 op->flags & BCH_WRITE_CACHED); in init_append_extent()
710 bch2_keylist_push(&op->insert_keys); in init_append_extent()
763 struct bch_write_op *op, in bch2_write_rechecksum() argument
766 struct bio *bio = &op->wbio.bio; in bch2_write_rechecksum()
772 if (bch2_csum_type_is_encryption(op->crc.csum_type) != in bch2_write_rechecksum()
774 new_csum_type = op->crc.csum_type; in bch2_write_rechecksum()
776 ret = bch2_rechecksum_bio(c, bio, op->version, op->crc, in bch2_write_rechecksum()
778 op->crc.offset, op->crc.live_size, in bch2_write_rechecksum()
783 bio_advance(bio, op->crc.offset << 9); in bch2_write_rechecksum()
784 bio->bi_iter.bi_size = op->crc.live_size << 9; in bch2_write_rechecksum()
785 op->crc = new_crc; in bch2_write_rechecksum()
789 static int bch2_write_decrypt(struct bch_write_op *op) in bch2_write_decrypt() argument
791 struct bch_fs *c = op->c; in bch2_write_decrypt()
792 struct nonce nonce = extent_nonce(op->version, op->crc); in bch2_write_decrypt()
796 if (!bch2_csum_type_is_encryption(op->crc.csum_type)) in bch2_write_decrypt()
805 csum = bch2_checksum_bio(c, op->crc.csum_type, nonce, &op->wbio.bio); in bch2_write_decrypt()
806 if (bch2_crc_cmp(op->crc.csum, csum) && !c->opts.no_data_io) in bch2_write_decrypt()
809 ret = bch2_encrypt_bio(c, op->crc.csum_type, nonce, &op->wbio.bio); in bch2_write_decrypt()
810 op->crc.csum_type = 0; in bch2_write_decrypt()
811 op->crc.csum = (struct bch_csum) { 0, 0 }; in bch2_write_decrypt()
820 } bch2_write_prep_encoded_data(struct bch_write_op *op, struct write_point *wp) in bch2_write_prep_encoded_data() argument
822 struct bch_fs *c = op->c; in bch2_write_prep_encoded_data()
823 struct bio *bio = &op->wbio.bio; in bch2_write_prep_encoded_data()
825 if (!(op->flags & BCH_WRITE_DATA_ENCODED)) in bch2_write_prep_encoded_data()
828 BUG_ON(bio_sectors(bio) != op->crc.compressed_size); in bch2_write_prep_encoded_data()
831 if (op->crc.uncompressed_size == op->crc.live_size && in bch2_write_prep_encoded_data()
832 op->crc.uncompressed_size <= c->opts.encoded_extent_max >> 9 && in bch2_write_prep_encoded_data()
833 op->crc.compressed_size <= wp->sectors_free && in bch2_write_prep_encoded_data()
834 (op->crc.compression_type == bch2_compression_opt_to_type(op->compression_opt) || in bch2_write_prep_encoded_data()
835 op->incompressible)) { in bch2_write_prep_encoded_data()
836 if (!crc_is_compressed(op->crc) && in bch2_write_prep_encoded_data()
837 op->csum_type != op->crc.csum_type && in bch2_write_prep_encoded_data()
838 bch2_write_rechecksum(c, op, op->csum_type) && in bch2_write_prep_encoded_data()
849 if (crc_is_compressed(op->crc)) { in bch2_write_prep_encoded_data()
852 if (bch2_write_decrypt(op)) in bch2_write_prep_encoded_data()
856 csum = bch2_checksum_bio(c, op->crc.csum_type, in bch2_write_prep_encoded_data()
857 extent_nonce(op->version, op->crc), in bch2_write_prep_encoded_data()
859 if (bch2_crc_cmp(op->crc.csum, csum) && !c->opts.no_data_io) in bch2_write_prep_encoded_data()
862 if (bch2_bio_uncompress_inplace(c, bio, &op->crc)) in bch2_write_prep_encoded_data()
875 if ((op->crc.live_size != op->crc.uncompressed_size || in bch2_write_prep_encoded_data()
876 op->crc.csum_type != op->csum_type) && in bch2_write_prep_encoded_data()
877 bch2_write_rechecksum(c, op, op->csum_type) && in bch2_write_prep_encoded_data()
884 if ((op->compression_opt || in bch2_write_prep_encoded_data()
885 bch2_csum_type_is_encryption(op->crc.csum_type) != in bch2_write_prep_encoded_data()
886 bch2_csum_type_is_encryption(op->csum_type)) && in bch2_write_prep_encoded_data()
887 bch2_write_decrypt(op)) in bch2_write_prep_encoded_data()
893 static int bch2_write_extent(struct bch_write_op *op, struct write_point *wp, in bch2_write_extent() argument
896 struct bch_fs *c = op->c; in bch2_write_extent()
897 struct bio *src = &op->wbio.bio, *dst = src; in bch2_write_extent()
909 switch (bch2_write_prep_encoded_data(op, wp)) { in bch2_write_extent()
926 init_append_extent(op, wp, op->version, op->crc); in bch2_write_extent()
931 op->compression_opt || in bch2_write_extent()
932 (op->csum_type && in bch2_write_extent()
933 !(op->flags & BCH_WRITE_PAGES_STABLE)) || in bch2_write_extent()
934 (bch2_csum_type_is_encryption(op->csum_type) && in bch2_write_extent()
935 !(op->flags & BCH_WRITE_PAGES_OWNED))) { in bch2_write_extent()
946 struct bversion version = op->version; in bch2_write_extent()
954 BUG_ON(op->compression_opt && in bch2_write_extent()
955 (op->flags & BCH_WRITE_DATA_ENCODED) && in bch2_write_extent()
956 bch2_csum_type_is_encryption(op->crc.csum_type)); in bch2_write_extent()
957 BUG_ON(op->compression_opt && !bounce); in bch2_write_extent()
959 crc.compression_type = op->incompressible in bch2_write_extent()
961 : op->compression_opt in bch2_write_extent()
963 op->compression_opt) in bch2_write_extent()
969 if (op->csum_type) in bch2_write_extent()
984 if (bch2_csum_type_is_encryption(op->csum_type)) { in bch2_write_extent()
988 crc.nonce = op->nonce; in bch2_write_extent()
989 op->nonce += src_len >> 9; in bch2_write_extent()
993 if ((op->flags & BCH_WRITE_DATA_ENCODED) && in bch2_write_extent()
995 bch2_csum_type_is_encryption(op->crc.csum_type) == in bch2_write_extent()
996 bch2_csum_type_is_encryption(op->csum_type)) { in bch2_write_extent()
1011 if (bch2_rechecksum_bio(c, src, version, op->crc, in bch2_write_extent()
1012 &crc, &op->crc, in bch2_write_extent()
1015 op->csum_type)) in bch2_write_extent()
1025 if ((op->flags & BCH_WRITE_DATA_ENCODED) && in bch2_write_extent()
1026 bch2_rechecksum_bio(c, src, version, op->crc, in bch2_write_extent()
1027 NULL, &op->crc, in bch2_write_extent()
1030 op->crc.csum_type)) in bch2_write_extent()
1038 ret = bch2_encrypt_bio(c, op->csum_type, in bch2_write_extent()
1043 crc.csum = bch2_checksum_bio(c, op->csum_type, in bch2_write_extent()
1045 crc.csum_type = op->csum_type; in bch2_write_extent()
1049 init_append_extent(op, wp, version, crc); in bch2_write_extent()
1059 !bch2_keylist_realloc(&op->insert_keys, in bch2_write_extent()
1060 op->inline_keys, in bch2_write_extent()
1061 ARRAY_SIZE(op->inline_keys), in bch2_write_extent()
1084 op->pos.inode, in bch2_write_extent()
1085 op->pos.offset << 9, in bch2_write_extent()
1087 op->flags & BCH_WRITE_MOVE ? "move" : "user"); in bch2_write_extent()
1098 static bool bch2_extent_is_writeable(struct bch_write_op *op, in bch2_extent_is_writeable() argument
1101 struct bch_fs *c = op->c; in bch2_extent_is_writeable()
1123 return replicas >= op->opts.data_replicas; in bch2_extent_is_writeable()
1162 static void bch2_nocow_write_convert_unwritten(struct bch_write_op *op) in bch2_nocow_write_convert_unwritten() argument
1164 struct bch_fs *c = op->c; in bch2_nocow_write_convert_unwritten()
1167 for_each_keylist_key(&op->insert_keys, orig) { in bch2_nocow_write_convert_unwritten()
1172 bch2_nocow_write_convert_one_unwritten(trans, &iter, orig, k, op->new_i_size); in bch2_nocow_write_convert_unwritten()
1176 struct bkey_i *insert = bch2_keylist_front(&op->insert_keys); in bch2_nocow_write_convert_unwritten()
1181 op->flags & BCH_WRITE_MOVE ? "move" : "user", in bch2_nocow_write_convert_unwritten()
1186 op->error = ret; in bch2_nocow_write_convert_unwritten()
1194 static void __bch2_nocow_write_done(struct bch_write_op *op) in __bch2_nocow_write_done() argument
1196 if (unlikely(op->flags & BCH_WRITE_IO_ERROR)) { in __bch2_nocow_write_done()
1197 op->error = -EIO; in __bch2_nocow_write_done()
1198 } else if (unlikely(op->flags & BCH_WRITE_CONVERT_UNWRITTEN)) in __bch2_nocow_write_done()
1199 bch2_nocow_write_convert_unwritten(op); in __bch2_nocow_write_done()
1204 closure_type(op, struct bch_write_op, cl); in CLOSURE_CALLBACK()
1206 __bch2_nocow_write_done(op); in CLOSURE_CALLBACK()
1216 static void bch2_nocow_write(struct bch_write_op *op) in bch2_nocow_write() argument
1218 struct bch_fs *c = op->c; in bch2_nocow_write()
1227 if (op->flags & BCH_WRITE_MOVE) in bch2_nocow_write()
1235 ret = bch2_subvolume_get_snapshot(trans, op->subvol, &snapshot); in bch2_nocow_write()
1240 SPOS(op->pos.inode, op->pos.offset, snapshot), in bch2_nocow_write()
1243 struct bio *bio = &op->wbio.bio; in bch2_nocow_write()
1258 !bch2_extent_is_writeable(op, k))) in bch2_nocow_write()
1261 if (bch2_keylist_realloc(&op->insert_keys, in bch2_nocow_write()
1262 op->inline_keys, in bch2_nocow_write()
1263 ARRAY_SIZE(op->inline_keys), in bch2_nocow_write()
1285 op->flags |= BCH_WRITE_CONVERT_UNWRITTEN; in bch2_nocow_write()
1289 bkey_reassemble(op->insert_keys.top, k); in bch2_nocow_write()
1292 bch2_cut_front(op->pos, op->insert_keys.top); in bch2_nocow_write()
1293 if (op->flags & BCH_WRITE_CONVERT_UNWRITTEN) in bch2_nocow_write()
1294 bch2_cut_back(POS(op->pos.inode, op->pos.offset + bio_sectors(bio)), op->insert_keys.top); in bch2_nocow_write()
1311 bio = &op->wbio.bio; in bch2_nocow_write()
1312 if (k.k->p.offset < op->pos.offset + bio_sectors(bio)) { in bch2_nocow_write()
1313 bio = bio_split(bio, k.k->p.offset - op->pos.offset, in bch2_nocow_write()
1316 bio->bi_opf = op->wbio.bio.bi_opf; in bch2_nocow_write()
1318 op->flags |= BCH_WRITE_SUBMITTED; in bch2_nocow_write()
1321 op->pos.offset += bio_sectors(bio); in bch2_nocow_write()
1322 op->written += bio_sectors(bio); in bch2_nocow_write()
1325 bio->bi_private = &op->cl; in bch2_nocow_write()
1327 closure_get(&op->cl); in bch2_nocow_write()
1329 op->insert_keys.top, true); in bch2_nocow_write()
1331 bch2_keylist_push(&op->insert_keys); in bch2_nocow_write()
1332 if (op->flags & BCH_WRITE_SUBMITTED) in bch2_nocow_write()
1344 op->pos.inode, op->pos.offset << 9, in bch2_nocow_write()
1346 op->error = ret; in bch2_nocow_write()
1347 op->flags |= BCH_WRITE_SUBMITTED; in bch2_nocow_write()
1354 if (!(op->flags & BCH_WRITE_SUBMITTED)) { in bch2_nocow_write()
1355 closure_sync(&op->cl); in bch2_nocow_write()
1356 __bch2_nocow_write_done(op); in bch2_nocow_write()
1357 op->insert_keys.top = op->insert_keys.keys; in bch2_nocow_write()
1358 } else if (op->flags & BCH_WRITE_SYNC) { in bch2_nocow_write()
1359 closure_sync(&op->cl); in bch2_nocow_write()
1360 bch2_nocow_write_done(&op->cl.work); in bch2_nocow_write()
1367 continue_at(&op->cl, bch2_nocow_write_done, index_update_wq(op)); in bch2_nocow_write()
1398 static void __bch2_write(struct bch_write_op *op) in __bch2_write() argument
1400 struct bch_fs *c = op->c; in __bch2_write()
1408 if (unlikely(op->opts.nocow && c->opts.nocow_enabled)) { in __bch2_write()
1409 bch2_nocow_write(op); in __bch2_write()
1410 if (op->flags & BCH_WRITE_SUBMITTED) in __bch2_write()
1414 memset(&op->failed, 0, sizeof(op->failed)); in __bch2_write()
1418 unsigned key_to_write_offset = op->insert_keys.top_p - in __bch2_write()
1419 op->insert_keys.keys_p; in __bch2_write()
1422 if (op->open_buckets.nr + op->nr_replicas + 1 > in __bch2_write()
1423 ARRAY_SIZE(op->open_buckets.v)) in __bch2_write()
1426 if (bch2_keylist_realloc(&op->insert_keys, in __bch2_write()
1427 op->inline_keys, in __bch2_write()
1428 ARRAY_SIZE(op->inline_keys), in __bch2_write()
1439 op->target, in __bch2_write()
1440 op->opts.erasure_code && !(op->flags & BCH_WRITE_CACHED), in __bch2_write()
1441 op->write_point, in __bch2_write()
1442 &op->devs_have, in __bch2_write()
1443 op->nr_replicas, in __bch2_write()
1444 op->nr_replicas_required, in __bch2_write()
1445 op->watermark, in __bch2_write()
1446 op->flags, in __bch2_write()
1447 &op->cl, &wp))); in __bch2_write()
1457 bch2_open_bucket_get(c, wp, &op->open_buckets); in __bch2_write()
1458 ret = bch2_write_extent(op, wp, &bio); in __bch2_write()
1463 op->flags |= BCH_WRITE_SUBMITTED; in __bch2_write()
1466 if (!(op->flags & BCH_WRITE_ALLOC_NOWAIT)) in __bch2_write()
1468 op->pos.inode, in __bch2_write()
1469 op->pos.offset << 9, in __bch2_write()
1471 op->flags & BCH_WRITE_MOVE ? "move" : "user", in __bch2_write()
1473 op->error = ret; in __bch2_write()
1479 bio->bi_private = &op->cl; in __bch2_write()
1484 key_to_write = (void *) (op->insert_keys.keys_p + in __bch2_write()
1498 if ((op->flags & BCH_WRITE_SYNC) || in __bch2_write()
1499 (!(op->flags & BCH_WRITE_SUBMITTED) && in __bch2_write()
1500 !(op->flags & BCH_WRITE_IN_WORKER))) { in __bch2_write()
1501 bch2_wait_on_allocator(c, &op->cl); in __bch2_write()
1503 __bch2_write_index(op); in __bch2_write()
1505 if (!(op->flags & BCH_WRITE_SUBMITTED)) in __bch2_write()
1507 bch2_write_done(&op->cl); in __bch2_write()
1509 bch2_write_queue(op, wp); in __bch2_write()
1510 continue_at(&op->cl, bch2_write_index, NULL); in __bch2_write()
1516 static void bch2_write_data_inline(struct bch_write_op *op, unsigned data_len) in bch2_write_data_inline() argument
1518 struct bio *bio = &op->wbio.bio; in bch2_write_data_inline()
1524 memset(&op->failed, 0, sizeof(op->failed)); in bch2_write_data_inline()
1526 op->flags |= BCH_WRITE_WROTE_DATA_INLINE; in bch2_write_data_inline()
1527 op->flags |= BCH_WRITE_SUBMITTED; in bch2_write_data_inline()
1529 bch2_check_set_feature(op->c, BCH_FEATURE_inline_data); in bch2_write_data_inline()
1531 ret = bch2_keylist_realloc(&op->insert_keys, op->inline_keys, in bch2_write_data_inline()
1532 ARRAY_SIZE(op->inline_keys), in bch2_write_data_inline()
1535 op->error = ret; in bch2_write_data_inline()
1540 op->pos.offset += sectors; in bch2_write_data_inline()
1542 id = bkey_inline_data_init(op->insert_keys.top); in bch2_write_data_inline()
1543 id->k.p = op->pos; in bch2_write_data_inline()
1544 id->k.bversion = op->version; in bch2_write_data_inline()
1554 bch2_keylist_push(&op->insert_keys); in bch2_write_data_inline()
1556 __bch2_write_index(op); in bch2_write_data_inline()
1558 bch2_write_done(&op->cl); in bch2_write_data_inline()
1580 closure_type(op, struct bch_write_op, cl); in CLOSURE_CALLBACK()
1581 struct bio *bio = &op->wbio.bio; in CLOSURE_CALLBACK()
1582 struct bch_fs *c = op->c; in CLOSURE_CALLBACK()
1585 EBUG_ON(op->cl.parent); in CLOSURE_CALLBACK()
1586 BUG_ON(!op->nr_replicas); in CLOSURE_CALLBACK()
1587 BUG_ON(!op->write_point.v); in CLOSURE_CALLBACK()
1588 BUG_ON(bkey_eq(op->pos, POS_MAX)); in CLOSURE_CALLBACK()
1590 if (op->flags & BCH_WRITE_ONLY_SPECIFIED_DEVS) in CLOSURE_CALLBACK()
1591 op->flags |= BCH_WRITE_ALLOC_NOWAIT; in CLOSURE_CALLBACK()
1593 op->nr_replicas_required = min_t(unsigned, op->nr_replicas_required, op->nr_replicas); in CLOSURE_CALLBACK()
1594 op->start_time = local_clock(); in CLOSURE_CALLBACK()
1595 bch2_keylist_init(&op->insert_keys, op->inline_keys); in CLOSURE_CALLBACK()
1600 op->pos.inode, in CLOSURE_CALLBACK()
1601 op->pos.offset << 9, in CLOSURE_CALLBACK()
1603 op->flags & BCH_WRITE_MOVE ? "move" : "user"); in CLOSURE_CALLBACK()
1604 op->error = -EIO; in CLOSURE_CALLBACK()
1609 op->error = -BCH_ERR_erofs_no_writes; in CLOSURE_CALLBACK()
1613 if (!(op->flags & BCH_WRITE_MOVE) && in CLOSURE_CALLBACK()
1615 op->error = -BCH_ERR_erofs_no_writes; in CLOSURE_CALLBACK()
1623 op->new_i_size - (op->pos.offset << 9)); in CLOSURE_CALLBACK()
1627 bch2_write_data_inline(op, data_len); in CLOSURE_CALLBACK()
1631 __bch2_write(op); in CLOSURE_CALLBACK()
1634 bch2_disk_reservation_put(c, &op->res); in CLOSURE_CALLBACK()
1636 closure_debug_destroy(&op->cl); in CLOSURE_CALLBACK()
1637 if (op->end_io) in CLOSURE_CALLBACK()
1638 op->end_io(op); in CLOSURE_CALLBACK()
1648 void bch2_write_op_to_text(struct printbuf *out, struct bch_write_op *op) in bch2_write_op_to_text() argument
1651 bch2_bpos_to_text(out, op->pos); in bch2_write_op_to_text()
1656 bch2_pr_time_units(out, local_clock() - op->start_time); in bch2_write_op_to_text()
1660 prt_bitflags(out, bch2_write_flags, op->flags); in bch2_write_op_to_text()
1663 prt_printf(out, "ref: %u\n", closure_nr_remaining(&op->cl)); in bch2_write_op_to_text()