@@ -144,7 +144,7 @@ struct tree_entry {
144
144
*/
145
145
struct btrfs_bio_ctrl {
146
146
struct bio * bio ;
147
- unsigned long bio_flags ;
147
+ enum btrfs_compression_type compress_type ;
148
148
u32 len_to_stripe_boundary ;
149
149
u32 len_to_oe_boundary ;
150
150
};
@@ -3271,10 +3271,10 @@ static int btrfs_bio_add_page(struct btrfs_bio_ctrl *bio_ctrl,
3271
3271
ASSERT (bio );
3272
3272
/* The limit should be calculated when bio_ctrl->bio is allocated */
3273
3273
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 )
3275
3275
return 0 ;
3276
3276
3277
- if (bio_ctrl -> bio_flags != BTRFS_COMPRESS_NONE )
3277
+ if (bio_ctrl -> compress_type != BTRFS_COMPRESS_NONE )
3278
3278
contig = bio -> bi_iter .bi_sector == sector ;
3279
3279
else
3280
3280
contig = bio_end_sector (bio ) == sector ;
@@ -3317,7 +3317,7 @@ static int calc_bio_boundaries(struct btrfs_bio_ctrl *bio_ctrl,
3317
3317
* The split happens for real compressed bio, which happens in
3318
3318
* btrfs_submit_compressed_read/write().
3319
3319
*/
3320
- if (bio_ctrl -> bio_flags != BTRFS_COMPRESS_NONE ) {
3320
+ if (bio_ctrl -> compress_type != BTRFS_COMPRESS_NONE ) {
3321
3321
bio_ctrl -> len_to_oe_boundary = U32_MAX ;
3322
3322
bio_ctrl -> len_to_stripe_boundary = U32_MAX ;
3323
3323
return 0 ;
@@ -3376,7 +3376,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
3376
3376
else
3377
3377
bio -> bi_iter .bi_sector = (disk_bytenr + offset ) >> SECTOR_SHIFT ;
3378
3378
bio_ctrl -> bio = bio ;
3379
- bio_ctrl -> bio_flags = compress_type ;
3379
+ bio_ctrl -> compress_type = compress_type ;
3380
3380
bio -> bi_end_io = end_io_func ;
3381
3381
bio -> bi_private = & inode -> io_tree ;
3382
3382
bio -> bi_opf = opf ;
@@ -3456,7 +3456,7 @@ static int submit_extent_page(unsigned int opf,
3456
3456
ASSERT (pg_offset < PAGE_SIZE && size <= PAGE_SIZE &&
3457
3457
pg_offset + size <= PAGE_SIZE );
3458
3458
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 );
3460
3460
bio_ctrl -> bio = NULL ;
3461
3461
}
3462
3462
@@ -3498,7 +3498,7 @@ static int submit_extent_page(unsigned int opf,
3498
3498
if (added < size - offset ) {
3499
3499
/* The bio should contain some page(s) */
3500
3500
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 );
3502
3502
bio_ctrl -> bio = NULL ;
3503
3503
}
3504
3504
cur += added ;
@@ -3815,7 +3815,7 @@ int btrfs_readpage(struct file *file, struct page *page)
3815
3815
* bio to do the cleanup.
3816
3816
*/
3817
3817
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 );
3819
3819
return ret ;
3820
3820
}
3821
3821
@@ -5274,7 +5274,7 @@ void extent_readahead(struct readahead_control *rac)
5274
5274
free_extent_map (em_cached );
5275
5275
5276
5276
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 );
5278
5278
}
5279
5279
5280
5280
/*
@@ -6761,7 +6761,7 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num)
6761
6761
}
6762
6762
6763
6763
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 );
6765
6765
bio_ctrl .bio = NULL ;
6766
6766
}
6767
6767
0 commit comments