Skip to content

Commit 0f07003

Browse files
committed
btrfs: rename bio_ctrl::bio_flags to compress_type
The bio_ctrl is the last use of bio_flags that has been converted to compress type everywhere else. Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent cb3a12d commit 0f07003

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

fs/btrfs/extent_io.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct tree_entry {
144144
*/
145145
struct btrfs_bio_ctrl {
146146
struct bio *bio;
147-
unsigned long bio_flags;
147+
enum btrfs_compression_type compress_type;
148148
u32 len_to_stripe_boundary;
149149
u32 len_to_oe_boundary;
150150
};
@@ -3271,10 +3271,10 @@ static int btrfs_bio_add_page(struct btrfs_bio_ctrl *bio_ctrl,
32713271
ASSERT(bio);
32723272
/* The limit should be calculated when bio_ctrl->bio is allocated */
32733273
ASSERT(bio_ctrl->len_to_oe_boundary && bio_ctrl->len_to_stripe_boundary);
3274-
if (bio_ctrl->bio_flags != compress_type)
3274+
if (bio_ctrl->compress_type != compress_type)
32753275
return 0;
32763276

3277-
if (bio_ctrl->bio_flags != BTRFS_COMPRESS_NONE)
3277+
if (bio_ctrl->compress_type != BTRFS_COMPRESS_NONE)
32783278
contig = bio->bi_iter.bi_sector == sector;
32793279
else
32803280
contig = bio_end_sector(bio) == sector;
@@ -3317,7 +3317,7 @@ static int calc_bio_boundaries(struct btrfs_bio_ctrl *bio_ctrl,
33173317
* The split happens for real compressed bio, which happens in
33183318
* btrfs_submit_compressed_read/write().
33193319
*/
3320-
if (bio_ctrl->bio_flags != BTRFS_COMPRESS_NONE) {
3320+
if (bio_ctrl->compress_type != BTRFS_COMPRESS_NONE) {
33213321
bio_ctrl->len_to_oe_boundary = U32_MAX;
33223322
bio_ctrl->len_to_stripe_boundary = U32_MAX;
33233323
return 0;
@@ -3376,7 +3376,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
33763376
else
33773377
bio->bi_iter.bi_sector = (disk_bytenr + offset) >> SECTOR_SHIFT;
33783378
bio_ctrl->bio = bio;
3379-
bio_ctrl->bio_flags = compress_type;
3379+
bio_ctrl->compress_type = compress_type;
33803380
bio->bi_end_io = end_io_func;
33813381
bio->bi_private = &inode->io_tree;
33823382
bio->bi_opf = opf;
@@ -3456,7 +3456,7 @@ static int submit_extent_page(unsigned int opf,
34563456
ASSERT(pg_offset < PAGE_SIZE && size <= PAGE_SIZE &&
34573457
pg_offset + size <= PAGE_SIZE);
34583458
if (force_bio_submit && bio_ctrl->bio) {
3459-
submit_one_bio(bio_ctrl->bio, mirror_num, bio_ctrl->bio_flags);
3459+
submit_one_bio(bio_ctrl->bio, mirror_num, bio_ctrl->compress_type);
34603460
bio_ctrl->bio = NULL;
34613461
}
34623462

@@ -3498,7 +3498,7 @@ static int submit_extent_page(unsigned int opf,
34983498
if (added < size - offset) {
34993499
/* The bio should contain some page(s) */
35003500
ASSERT(bio_ctrl->bio->bi_iter.bi_size);
3501-
submit_one_bio(bio_ctrl->bio, mirror_num, bio_ctrl->bio_flags);
3501+
submit_one_bio(bio_ctrl->bio, mirror_num, bio_ctrl->compress_type);
35023502
bio_ctrl->bio = NULL;
35033503
}
35043504
cur += added;
@@ -3815,7 +3815,7 @@ int btrfs_readpage(struct file *file, struct page *page)
38153815
* bio to do the cleanup.
38163816
*/
38173817
if (bio_ctrl.bio)
3818-
submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.bio_flags);
3818+
submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.compress_type);
38193819
return ret;
38203820
}
38213821

@@ -5274,7 +5274,7 @@ void extent_readahead(struct readahead_control *rac)
52745274
free_extent_map(em_cached);
52755275

52765276
if (bio_ctrl.bio)
5277-
submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.bio_flags);
5277+
submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.compress_type);
52785278
}
52795279

52805280
/*
@@ -6761,7 +6761,7 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num)
67616761
}
67626762

67636763
if (bio_ctrl.bio) {
6764-
submit_one_bio(bio_ctrl.bio, mirror_num, bio_ctrl.bio_flags);
6764+
submit_one_bio(bio_ctrl.bio, mirror_num, bio_ctrl.compress_type);
67656765
bio_ctrl.bio = NULL;
67666766
}
67676767

0 commit comments

Comments
 (0)