btrfs: open-code bio_set_op_attrs
The helper is trivial and marked as deprecated. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
cc5e31a477
commit
ebcc326316
6 changed files with 13 additions and 13 deletions
|
@ -1629,7 +1629,7 @@ static int btrfsic_read_block(struct btrfsic_state *state,
|
|||
bio = btrfs_io_bio_alloc(num_pages - i);
|
||||
bio_set_dev(bio, block_ctx->dev->bdev);
|
||||
bio->bi_iter.bi_sector = dev_bytenr >> 9;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, 0);
|
||||
bio->bi_opf = REQ_OP_READ;
|
||||
|
||||
for (j = i; j < num_pages; j++) {
|
||||
ret = bio_add_page(bio, block_ctx->pagev[j],
|
||||
|
|
|
@ -609,7 +609,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
cb->len = bio->bi_iter.bi_size;
|
||||
|
||||
comp_bio = btrfs_bio_alloc(bdev, cur_disk_byte);
|
||||
bio_set_op_attrs (comp_bio, REQ_OP_READ, 0);
|
||||
comp_bio->bi_opf = REQ_OP_READ;
|
||||
comp_bio->bi_private = cb;
|
||||
comp_bio->bi_end_io = end_compressed_bio_read;
|
||||
refcount_set(&cb->pending_bios, 1);
|
||||
|
@ -656,7 +656,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
}
|
||||
|
||||
comp_bio = btrfs_bio_alloc(bdev, cur_disk_byte);
|
||||
bio_set_op_attrs(comp_bio, REQ_OP_READ, 0);
|
||||
comp_bio->bi_opf = REQ_OP_READ;
|
||||
comp_bio->bi_private = cb;
|
||||
comp_bio->bi_end_io = end_compressed_bio_read;
|
||||
|
||||
|
|
|
@ -2398,7 +2398,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
|
|||
start - page_offset(page),
|
||||
(int)phy_offset, failed_bio->bi_end_io,
|
||||
NULL);
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, read_mode);
|
||||
bio->bi_opf = REQ_OP_READ | read_mode;
|
||||
|
||||
btrfs_debug(btrfs_sb(inode->i_sb),
|
||||
"Repair Read Error: submitting new read[%#x] to this_mirror=%d, in_validation=%d",
|
||||
|
|
|
@ -7861,7 +7861,7 @@ static blk_status_t dio_read_error(struct inode *inode, struct bio *failed_bio,
|
|||
isector >>= inode->i_sb->s_blocksize_bits;
|
||||
bio = btrfs_create_repair_bio(inode, failed_bio, failrec, page,
|
||||
pgoff, isector, repair_endio, repair_arg);
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, read_mode);
|
||||
bio->bi_opf = REQ_OP_READ | read_mode;
|
||||
|
||||
btrfs_debug(BTRFS_I(inode)->root->fs_info,
|
||||
"repair DIO read error: submitting new dio read[%#x] to this_mirror=%d, in_validation=%d",
|
||||
|
|
|
@ -1330,7 +1330,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
|
|||
|
||||
bio->bi_private = rbio;
|
||||
bio->bi_end_io = raid_write_end_io;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
bio->bi_opf = REQ_OP_WRITE;
|
||||
|
||||
submit_bio(bio);
|
||||
}
|
||||
|
@ -1586,7 +1586,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
|
|||
|
||||
bio->bi_private = rbio;
|
||||
bio->bi_end_io = raid_rmw_end_io;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, 0);
|
||||
bio->bi_opf = REQ_OP_READ;
|
||||
|
||||
btrfs_bio_wq_end_io(rbio->fs_info, bio, BTRFS_WQ_ENDIO_RAID56);
|
||||
|
||||
|
@ -2130,7 +2130,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
|
|||
|
||||
bio->bi_private = rbio;
|
||||
bio->bi_end_io = raid_recover_end_io;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, 0);
|
||||
bio->bi_opf = REQ_OP_READ;
|
||||
|
||||
btrfs_bio_wq_end_io(rbio->fs_info, bio, BTRFS_WQ_ENDIO_RAID56);
|
||||
|
||||
|
@ -2502,7 +2502,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
|
|||
|
||||
bio->bi_private = rbio;
|
||||
bio->bi_end_io = raid_write_end_io;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
bio->bi_opf = REQ_OP_WRITE;
|
||||
|
||||
submit_bio(bio);
|
||||
}
|
||||
|
@ -2684,7 +2684,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
|
|||
|
||||
bio->bi_private = rbio;
|
||||
bio->bi_end_io = raid56_parity_scrub_end_io;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, 0);
|
||||
bio->bi_opf = REQ_OP_READ;
|
||||
|
||||
btrfs_bio_wq_end_io(rbio->fs_info, bio, BTRFS_WQ_ENDIO_RAID56);
|
||||
|
||||
|
|
|
@ -1842,7 +1842,7 @@ static int scrub_repair_page_from_good_copy(struct scrub_block *sblock_bad,
|
|||
bio = btrfs_io_bio_alloc(1);
|
||||
bio_set_dev(bio, page_bad->dev->bdev);
|
||||
bio->bi_iter.bi_sector = page_bad->physical >> 9;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
bio->bi_opf = REQ_OP_WRITE;
|
||||
|
||||
ret = bio_add_page(bio, page_good->page, PAGE_SIZE, 0);
|
||||
if (PAGE_SIZE != ret) {
|
||||
|
@ -1937,7 +1937,7 @@ static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
|
|||
bio->bi_end_io = scrub_wr_bio_end_io;
|
||||
bio_set_dev(bio, sbio->dev->bdev);
|
||||
bio->bi_iter.bi_sector = sbio->physical >> 9;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
bio->bi_opf = REQ_OP_WRITE;
|
||||
sbio->status = 0;
|
||||
} else if (sbio->physical + sbio->page_count * PAGE_SIZE !=
|
||||
spage->physical_for_dev_replace ||
|
||||
|
@ -2337,7 +2337,7 @@ static int scrub_add_page_to_rd_bio(struct scrub_ctx *sctx,
|
|||
bio->bi_end_io = scrub_bio_end_io;
|
||||
bio_set_dev(bio, sbio->dev->bdev);
|
||||
bio->bi_iter.bi_sector = sbio->physical >> 9;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, 0);
|
||||
bio->bi_opf = REQ_OP_READ;
|
||||
sbio->status = 0;
|
||||
} else if (sbio->physical + sbio->page_count * PAGE_SIZE !=
|
||||
spage->physical ||
|
||||
|
|
Loading…
Reference in a new issue