diff options
author | Mike Christie <mchristi@redhat.com> | 2016-06-05 14:31:54 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-07 13:41:38 -0600 |
commit | 81a75f6781deb7a3b5274b4c683e327e5cb5b883 (patch) | |
tree | c1e479b4a6621782209966d0402884ff1c82a85a /fs/btrfs/extent_io.c | |
parent | b3d3fa51990599732571bf1a6b1509f7ee887865 (diff) |
btrfs: use bio fields for op and flags
The bio REQ_OP and bi_rw rq_flag_bits are now always setup, so there is
no need to pass around the rq_flag_bits bits too. btrfs users should
should access the bio insead.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3d5ac79a6e3c..4f8bace0fd1b 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2418,8 +2418,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset, pr_debug("Repair Read Error: submitting new read[%#x] to this_mirror=%d, in_validation=%d\n", read_mode, failrec->this_mirror, failrec->in_validation); - ret = tree->ops->submit_bio_hook(inode, read_mode, bio, - failrec->this_mirror, + ret = tree->ops->submit_bio_hook(inode, bio, failrec->this_mirror, failrec->bio_flags, 0); if (ret) { free_io_failure(inode, failrec); @@ -2740,9 +2739,8 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num, bio_get(bio); if (tree->ops && tree->ops->submit_bio_hook) - ret = tree->ops->submit_bio_hook(page->mapping->host, - bio->bi_rw, bio, mirror_num, - bio_flags, start); + ret = tree->ops->submit_bio_hook(page->mapping->host, bio, + mirror_num, bio_flags, start); else btrfsic_submit_bio(bio); @@ -2756,8 +2754,8 @@ static int merge_bio(struct extent_io_tree *tree, struct page *page, { int ret = 0; if (tree->ops && tree->ops->merge_bio_hook) - ret = tree->ops->merge_bio_hook(bio_op(bio), page, offset, size, - bio, bio_flags); + ret = tree->ops->merge_bio_hook(page, offset, size, bio, + bio_flags); BUG_ON(ret < 0); return ret; |