@@ -241,7 +241,7 @@ int __init extent_io_init(void)
241241 return - ENOMEM ;
242242
243243 if (bioset_init (& btrfs_bioset , BIO_POOL_SIZE ,
244- offsetof(struct btrfs_io_bio , bio ),
244+ offsetof(struct btrfs_bio , bio ),
245245 BIOSET_NEED_BVECS ))
246246 goto free_buffer_cache ;
247247
@@ -2299,7 +2299,7 @@ static int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
22992299 if (btrfs_is_zoned (fs_info ))
23002300 return btrfs_repair_one_zone (fs_info , logical );
23012301
2302- bio = btrfs_io_bio_alloc (1 );
2302+ bio = btrfs_bio_alloc (1 );
23032303 bio -> bi_iter .bi_size = 0 ;
23042304 map_length = length ;
23052305
@@ -2618,10 +2618,10 @@ int btrfs_repair_one_sector(struct inode *inode,
26182618 struct btrfs_fs_info * fs_info = btrfs_sb (inode -> i_sb );
26192619 struct extent_io_tree * tree = & BTRFS_I (inode )-> io_tree ;
26202620 struct extent_io_tree * failure_tree = & BTRFS_I (inode )-> io_failure_tree ;
2621- struct btrfs_io_bio * failed_io_bio = btrfs_io_bio (failed_bio );
2621+ struct btrfs_bio * failed_bbio = btrfs_bio (failed_bio );
26222622 const int icsum = bio_offset >> fs_info -> sectorsize_bits ;
26232623 struct bio * repair_bio ;
2624- struct btrfs_io_bio * repair_io_bio ;
2624+ struct btrfs_bio * repair_bbio ;
26252625 blk_status_t status ;
26262626
26272627 btrfs_debug (fs_info ,
@@ -2639,24 +2639,24 @@ int btrfs_repair_one_sector(struct inode *inode,
26392639 return - EIO ;
26402640 }
26412641
2642- repair_bio = btrfs_io_bio_alloc (1 );
2643- repair_io_bio = btrfs_io_bio (repair_bio );
2642+ repair_bio = btrfs_bio_alloc (1 );
2643+ repair_bbio = btrfs_bio (repair_bio );
26442644 repair_bio -> bi_opf = REQ_OP_READ ;
26452645 repair_bio -> bi_end_io = failed_bio -> bi_end_io ;
26462646 repair_bio -> bi_iter .bi_sector = failrec -> logical >> 9 ;
26472647 repair_bio -> bi_private = failed_bio -> bi_private ;
26482648
2649- if (failed_io_bio -> csum ) {
2649+ if (failed_bbio -> csum ) {
26502650 const u32 csum_size = fs_info -> csum_size ;
26512651
2652- repair_io_bio -> csum = repair_io_bio -> csum_inline ;
2653- memcpy (repair_io_bio -> csum ,
2654- failed_io_bio -> csum + csum_size * icsum , csum_size );
2652+ repair_bbio -> csum = repair_bbio -> csum_inline ;
2653+ memcpy (repair_bbio -> csum ,
2654+ failed_bbio -> csum + csum_size * icsum , csum_size );
26552655 }
26562656
26572657 bio_add_page (repair_bio , page , failrec -> len , pgoff );
2658- repair_io_bio -> logical = failrec -> start ;
2659- repair_io_bio -> iter = repair_bio -> bi_iter ;
2658+ repair_bbio -> logical = failrec -> start ;
2659+ repair_bbio -> iter = repair_bio -> bi_iter ;
26602660
26612661 btrfs_debug (btrfs_sb (inode -> i_sb ),
26622662 "repair read error: submitting new read to mirror %d" ,
@@ -2976,7 +2976,7 @@ static struct extent_buffer *find_extent_buffer_readpage(
29762976static void end_bio_extent_readpage (struct bio * bio )
29772977{
29782978 struct bio_vec * bvec ;
2979- struct btrfs_io_bio * io_bio = btrfs_io_bio (bio );
2979+ struct btrfs_bio * bbio = btrfs_bio (bio );
29802980 struct extent_io_tree * tree , * failure_tree ;
29812981 struct processed_extent processed = { 0 };
29822982 /*
@@ -3003,7 +3003,7 @@ static void end_bio_extent_readpage(struct bio *bio)
30033003 btrfs_debug (fs_info ,
30043004 "end_bio_extent_readpage: bi_sector=%llu, err=%d, mirror=%u" ,
30053005 bio -> bi_iter .bi_sector , bio -> bi_status ,
3006- io_bio -> mirror_num );
3006+ bbio -> mirror_num );
30073007 tree = & BTRFS_I (inode )-> io_tree ;
30083008 failure_tree = & BTRFS_I (inode )-> io_failure_tree ;
30093009
@@ -3028,14 +3028,14 @@ static void end_bio_extent_readpage(struct bio *bio)
30283028 end = start + bvec -> bv_len - 1 ;
30293029 len = bvec -> bv_len ;
30303030
3031- mirror = io_bio -> mirror_num ;
3031+ mirror = bbio -> mirror_num ;
30323032 if (likely (uptodate )) {
30333033 if (is_data_inode (inode )) {
3034- error_bitmap = btrfs_verify_data_csum (io_bio ,
3034+ error_bitmap = btrfs_verify_data_csum (bbio ,
30353035 bio_offset , page , start , end );
30363036 ret = error_bitmap ;
30373037 } else {
3038- ret = btrfs_validate_metadata_buffer (io_bio ,
3038+ ret = btrfs_validate_metadata_buffer (bbio ,
30393039 page , start , end , mirror );
30403040 }
30413041 if (ret )
@@ -3106,7 +3106,7 @@ static void end_bio_extent_readpage(struct bio *bio)
31063106 }
31073107 /* Release the last extent */
31083108 endio_readpage_release_extent (& processed , NULL , 0 , 0 , false);
3109- btrfs_io_bio_free_csum ( io_bio );
3109+ btrfs_bio_free_csum ( bbio );
31103110 bio_put (bio );
31113111}
31123112
@@ -3115,55 +3115,55 @@ static void end_bio_extent_readpage(struct bio *bio)
31153115 * new bio by bio_alloc_bioset as it does not initialize the bytes outside of
31163116 * 'bio' because use of __GFP_ZERO is not supported.
31173117 */
3118- static inline void btrfs_io_bio_init (struct btrfs_io_bio * btrfs_bio )
3118+ static inline void btrfs_bio_init (struct btrfs_bio * bbio )
31193119{
3120- memset (btrfs_bio , 0 , offsetof(struct btrfs_io_bio , bio ));
3120+ memset (bbio , 0 , offsetof(struct btrfs_bio , bio ));
31213121}
31223122
31233123/*
31243124 * Allocate a btrfs_io_bio, with @nr_iovecs as maximum number of iovecs.
31253125 *
31263126 * The bio allocation is backed by bioset and does not fail.
31273127 */
3128- struct bio * btrfs_io_bio_alloc (unsigned int nr_iovecs )
3128+ struct bio * btrfs_bio_alloc (unsigned int nr_iovecs )
31293129{
31303130 struct bio * bio ;
31313131
31323132 ASSERT (0 < nr_iovecs && nr_iovecs <= BIO_MAX_VECS );
31333133 bio = bio_alloc_bioset (GFP_NOFS , nr_iovecs , & btrfs_bioset );
3134- btrfs_io_bio_init ( btrfs_io_bio (bio ));
3134+ btrfs_bio_init ( btrfs_bio (bio ));
31353135 return bio ;
31363136}
31373137
31383138struct bio * btrfs_bio_clone (struct bio * bio )
31393139{
3140- struct btrfs_io_bio * btrfs_bio ;
3140+ struct btrfs_bio * bbio ;
31413141 struct bio * new ;
31423142
31433143 /* Bio allocation backed by a bioset does not fail */
31443144 new = bio_clone_fast (bio , GFP_NOFS , & btrfs_bioset );
3145- btrfs_bio = btrfs_io_bio (new );
3146- btrfs_io_bio_init ( btrfs_bio );
3147- btrfs_bio -> iter = bio -> bi_iter ;
3145+ bbio = btrfs_bio (new );
3146+ btrfs_bio_init ( bbio );
3147+ bbio -> iter = bio -> bi_iter ;
31483148 return new ;
31493149}
31503150
31513151struct bio * btrfs_bio_clone_partial (struct bio * orig , u64 offset , u64 size )
31523152{
31533153 struct bio * bio ;
3154- struct btrfs_io_bio * btrfs_bio ;
3154+ struct btrfs_bio * bbio ;
31553155
31563156 ASSERT (offset <= UINT_MAX && size <= UINT_MAX );
31573157
31583158 /* this will never fail when it's backed by a bioset */
31593159 bio = bio_clone_fast (orig , GFP_NOFS , & btrfs_bioset );
31603160 ASSERT (bio );
31613161
3162- btrfs_bio = btrfs_io_bio (bio );
3163- btrfs_io_bio_init ( btrfs_bio );
3162+ bbio = btrfs_bio (bio );
3163+ btrfs_bio_init ( bbio );
31643164
31653165 bio_trim (bio , offset >> 9 , size >> 9 );
3166- btrfs_bio -> iter = bio -> bi_iter ;
3166+ bbio -> iter = bio -> bi_iter ;
31673167 return bio ;
31683168}
31693169
@@ -3297,7 +3297,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
32973297 struct bio * bio ;
32983298 int ret ;
32993299
3300- bio = btrfs_io_bio_alloc (BIO_MAX_VECS );
3300+ bio = btrfs_bio_alloc (BIO_MAX_VECS );
33013301 /*
33023302 * For compressed page range, its disk_bytenr is always @disk_bytenr
33033303 * passed in, no matter if we have added any range into previous bio.
@@ -3332,7 +3332,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
33323332 goto error ;
33333333 }
33343334
3335- btrfs_io_bio (bio )-> device = device ;
3335+ btrfs_bio (bio )-> device = device ;
33363336 }
33373337 return 0 ;
33383338error :
0 commit comments