Home
last modified time | relevance | path

Searched refs:bbio (Results 1 – 21 of 21) sorted by relevance

/linux/fs/btrfs/
H A Dbio.c24 struct btrfs_bio *bbio; member
30 static inline bool is_data_bbio(struct btrfs_bio *bbio) in is_data_bbio() argument
32 return bbio->inode && is_data_inode(bbio->inode); in is_data_bbio()
35 static bool bbio_has_ordered_extent(struct btrfs_bio *bbio) in bbio_has_ordered_extent() argument
37 return is_data_bbio(bbio) && btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE; in bbio_has_ordered_extent()
44 void btrfs_bio_init(struct btrfs_bio *bbio, struct btrfs_fs_info *fs_info, in btrfs_bio_init() argument
47 memset(bbio, 0, offsetof(struct btrfs_bio, bio)); in btrfs_bio_init()
48 bbio->fs_info = fs_info; in btrfs_bio_init()
49 bbio->end_io = end_io; in btrfs_bio_init()
50 bbio->private = private; in btrfs_bio_init()
[all …]
H A Dcompression.c57 static inline struct compressed_bio *to_compressed_bio(struct btrfs_bio *bbio) in to_compressed_bio() argument
59 return container_of(bbio, struct compressed_bio, bbio); in to_compressed_bio()
66 struct btrfs_bio *bbio; in alloc_compressed_bio() local
68 bbio = btrfs_bio(bio_alloc_bioset(NULL, BTRFS_MAX_COMPRESSED_PAGES, op, in alloc_compressed_bio()
70 btrfs_bio_init(bbio, inode->root->fs_info, end_io, NULL); in alloc_compressed_bio()
71 bbio->inode = inode; in alloc_compressed_bio()
72 bbio->file_offset = start; in alloc_compressed_bio()
73 return to_compressed_bio(bbio); in alloc_compressed_bio()
264 static void end_bbio_compressed_read(struct btrfs_bio *bbio) in end_bbio_compressed_read() argument
266 struct compressed_bio *cb = to_compressed_bio(bbio); in end_bbio_compressed_read()
[all …]
H A Ddirect-io.c28 struct btrfs_bio bbio; member
644 static void btrfs_dio_end_io(struct btrfs_bio *bbio) in btrfs_dio_end_io() argument
647 container_of(bbio, struct btrfs_dio_private, bbio); in btrfs_dio_end_io()
648 struct btrfs_inode *inode = bbio->inode; in btrfs_dio_end_io()
649 struct bio *bio = &bbio->bio; in btrfs_dio_end_io()
659 btrfs_finish_ordered_extent(bbio->ordered, NULL, in btrfs_dio_end_io()
667 bbio->bio.bi_private = bbio->private; in btrfs_dio_end_io()
671 static int btrfs_extract_ordered_extent(struct btrfs_bio *bbio, in btrfs_extract_ordered_extent() argument
674 u64 start = (u64)bbio->bio.bi_iter.bi_sector << SECTOR_SHIFT; in btrfs_extract_ordered_extent()
675 u64 len = bbio->bio.bi_iter.bi_size; in btrfs_extract_ordered_extent()
[all …]
H A Dbio.h28 typedef void (*btrfs_bio_end_io_t)(struct btrfs_bio *bbio);
100 void btrfs_bio_init(struct btrfs_bio *bbio, struct btrfs_fs_info *fs_info,
105 void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status);
110 void btrfs_submit_bbio(struct btrfs_bio *bbio, int mirror_num);
111 void btrfs_submit_repair_write(struct btrfs_bio *bbio, int mirror_num, bool dev_replace);
H A Dscrub.c783 static void scrub_repair_read_endio(struct btrfs_bio *bbio) in scrub_repair_read_endio() argument
785 struct scrub_stripe *stripe = bbio->private; in scrub_repair_read_endio()
788 int sector_nr = calc_sector_number(stripe, bio_first_bvec_all(&bbio->bio)); in scrub_repair_read_endio()
794 bio_for_each_bvec_all(bvec, &bbio->bio, i) in scrub_repair_read_endio()
797 if (bbio->bio.bi_status) { in scrub_repair_read_endio()
806 bio_put(&bbio->bio); in scrub_repair_read_endio()
821 struct btrfs_bio *bbio = NULL; in scrub_stripe_submit_repair_read() local
837 if (bbio && ((i > 0 && !test_bit(i - 1, &stripe->error_bitmap)) || in scrub_stripe_submit_repair_read()
838 bbio->bio.bi_iter.bi_size >= blocksize)) { in scrub_stripe_submit_repair_read()
839 ASSERT(bbio->bio.bi_iter.bi_size); in scrub_stripe_submit_repair_read()
[all …]
H A Dfile-item.c341 blk_status_t btrfs_lookup_bio_sums(struct btrfs_bio *bbio) in btrfs_lookup_bio_sums() argument
343 struct btrfs_inode *inode = bbio->inode; in btrfs_lookup_bio_sums()
345 struct bio *bio = &bbio->bio; in btrfs_lookup_bio_sums()
377 bbio->csum = kmalloc_array(nblocks, csum_size, GFP_NOFS); in btrfs_lookup_bio_sums()
378 if (!bbio->csum) { in btrfs_lookup_bio_sums()
383 bbio->csum = bbio->csum_inline; in btrfs_lookup_bio_sums()
407 u8 *csum_dst = bbio->csum + in btrfs_lookup_bio_sums()
414 if (bbio->csum != bbio->csum_inline) in btrfs_lookup_bio_sums()
415 kfree(bbio->csum); in btrfs_lookup_bio_sums()
416 bbio->csum = NULL; in btrfs_lookup_bio_sums()
[all …]
H A Dextent_io.c98 struct btrfs_bio *bbio; member
115 struct btrfs_bio *bbio = bio_ctrl->bbio; in submit_one_bio() local
117 if (!bbio) in submit_one_bio()
121 ASSERT(bbio->bio.bi_iter.bi_size); in submit_one_bio()
123 if (btrfs_op(&bbio->bio) == BTRFS_MAP_READ && in submit_one_bio()
125 btrfs_submit_compressed_read(bbio); in submit_one_bio()
127 btrfs_submit_bbio(bbio, 0); in submit_one_bio()
130 bio_ctrl->bbio = NULL; in submit_one_bio()
138 struct btrfs_bio *bbio = bio_ctrl->bbio; in submit_write_bio() local
140 if (!bbio) in submit_write_bio()
[all …]
H A Dfile-item.h54 blk_status_t btrfs_lookup_bio_sums(struct btrfs_bio *bbio);
65 blk_status_t btrfs_csum_one_bio(struct btrfs_bio *bbio);
66 blk_status_t btrfs_alloc_dummy_sum(struct btrfs_bio *bbio);
H A Dzoned.h76 bool btrfs_use_zone_append(struct btrfs_bio *bbio);
77 void btrfs_record_physical_zoned(struct btrfs_bio *bbio);
191 static inline bool btrfs_use_zone_append(struct btrfs_bio *bbio) in btrfs_use_zone_append() argument
196 static inline void btrfs_record_physical_zoned(struct btrfs_bio *bbio) in btrfs_record_physical_zoned() argument
H A Dlzo.c334 const struct btrfs_fs_info *fs_info = cb->bbio.inode->root->fs_info; in lzo_decompress_bio()
359 struct btrfs_inode *inode = cb->bbio.inode; in lzo_decompress_bio()
390 struct btrfs_inode *inode = cb->bbio.inode; in lzo_decompress_bio()
410 struct btrfs_inode *inode = cb->bbio.inode; in lzo_decompress_bio()
H A Dzlib.c335 struct btrfs_inode *inode = cb->bbio.inode; in zlib_decompress_bio()
380 btrfs_err(cb->bbio.inode->root->fs_info, in zlib_decompress_bio()
382 ret, btrfs_root_id(cb->bbio.inode->root), in zlib_decompress_bio()
383 btrfs_ino(cb->bbio.inode), cb->start); in zlib_decompress_bio()
H A Dcompression.h72 struct btrfs_bio bbio; member
108 void btrfs_submit_compressed_read(struct btrfs_bio *bbio);
H A Dzoned.c1727 bool btrfs_use_zone_append(struct btrfs_bio *bbio) in btrfs_use_zone_append() argument
1729 u64 start = (bbio->bio.bi_iter.bi_sector << SECTOR_SHIFT); in btrfs_use_zone_append()
1730 struct btrfs_inode *inode = bbio->inode; in btrfs_use_zone_append()
1731 struct btrfs_fs_info *fs_info = bbio->fs_info; in btrfs_use_zone_append()
1741 if (btrfs_op(&bbio->bio) != BTRFS_MAP_WRITE) in btrfs_use_zone_append()
1766 void btrfs_record_physical_zoned(struct btrfs_bio *bbio) in btrfs_record_physical_zoned() argument
1768 const u64 physical = bbio->bio.bi_iter.bi_sector << SECTOR_SHIFT; in btrfs_record_physical_zoned()
1769 struct btrfs_ordered_sum *sum = bbio->sums; in btrfs_record_physical_zoned()
1771 if (physical < bbio->orig_physical) in btrfs_record_physical_zoned()
1772 sum->logical -= bbio->orig_physical - physical; in btrfs_record_physical_zoned()
[all …]
H A Dzstd.c590 struct btrfs_inode *inode = cb->bbio.inode; in zstd_decompress_bio()
613 struct btrfs_inode *inode = cb->bbio.inode; in zstd_decompress_bio()
H A Dinode.c3308 bool btrfs_data_csum_ok(struct btrfs_bio *bbio, struct btrfs_device *dev, in btrfs_data_csum_ok() argument
3311 struct btrfs_inode *inode = bbio->inode; in btrfs_data_csum_ok()
3313 u64 file_offset = bbio->file_offset + bio_offset; in btrfs_data_csum_ok()
3320 if (!bbio->csum) in btrfs_data_csum_ok()
3332 csum_expected = bbio->csum + (bio_offset >> fs_info->sectorsize_bits) * in btrfs_data_csum_ok()
3341 bbio->mirror_num); in btrfs_data_csum_ok()
9087 static void btrfs_encoded_read_endio(struct btrfs_bio *bbio) in btrfs_encoded_read_endio() argument
9089 struct btrfs_encoded_read_private *priv = bbio->private; in btrfs_encoded_read_endio()
9091 if (bbio->bio.bi_status) { in btrfs_encoded_read_endio()
9100 WRITE_ONCE(priv->status, bbio->bio.bi_status); in btrfs_encoded_read_endio()
[all …]
H A Dbtrfs_inode.h525 bool btrfs_data_csum_ok(struct btrfs_bio *bbio, struct btrfs_device *dev,
H A Ddisk-io.c260 blk_status_t btree_csum_one_bio(struct btrfs_bio *bbio) in btree_csum_one_bio() argument
262 struct extent_buffer *eb = bbio->private; in btree_csum_one_bio()
270 if (WARN_ON_ONCE(bbio->file_offset != eb->start)) in btree_csum_one_bio()
272 if (WARN_ON_ONCE(bbio->bio.bi_iter.bi_size != eb->len)) in btree_csum_one_bio()
/linux/drivers/md/bcache/
H A Dio.c19 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_free()
26 struct bbio *b = mempool_alloc(&c->bio_meta, GFP_NOIO); in bch_bbio_alloc()
37 struct bbio *b = container_of(bio, struct bbio, bio); in __bch_submit_bbio()
49 struct bbio *b = container_of(bio, struct bbio, bio); in bch_submit_bbio()
140 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_count_io_errors()
H A Dmovinggc.c19 struct bbio bio;
64 struct bbio *b = container_of(bio, struct bbio, bio); in read_moving_endio()
H A Dbcache.h745 struct bbio { struct
H A Dsuper.c948 if (bioset_init(&d->bio_split, 4, offsetof(struct bbio, bio), in bcache_device_init()
1921 sizeof(struct bbio) + in bch_cache_set_alloc()
1928 if (bioset_init(&c->bio_split, 4, offsetof(struct bbio, bio), in bch_cache_set_alloc()