mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
b3d3fa5199
commit
81a75f6781
9 changed files with 54 additions and 67 deletions
|
@ -374,7 +374,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
page = compressed_pages[pg_index];
|
||||
page->mapping = inode->i_mapping;
|
||||
if (bio->bi_iter.bi_size)
|
||||
ret = io_tree->ops->merge_bio_hook(WRITE, page, 0,
|
||||
ret = io_tree->ops->merge_bio_hook(page, 0,
|
||||
PAGE_SIZE,
|
||||
bio, 0);
|
||||
else
|
||||
|
@ -402,7 +402,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
BUG_ON(ret); /* -ENOMEM */
|
||||
}
|
||||
|
||||
ret = btrfs_map_bio(root, WRITE, bio, 0, 1);
|
||||
ret = btrfs_map_bio(root, bio, 0, 1);
|
||||
BUG_ON(ret); /* -ENOMEM */
|
||||
|
||||
bio_put(bio);
|
||||
|
@ -433,7 +433,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
BUG_ON(ret); /* -ENOMEM */
|
||||
}
|
||||
|
||||
ret = btrfs_map_bio(root, WRITE, bio, 0, 1);
|
||||
ret = btrfs_map_bio(root, bio, 0, 1);
|
||||
BUG_ON(ret); /* -ENOMEM */
|
||||
|
||||
bio_put(bio);
|
||||
|
@ -659,7 +659,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
page->index = em_start >> PAGE_SHIFT;
|
||||
|
||||
if (comp_bio->bi_iter.bi_size)
|
||||
ret = tree->ops->merge_bio_hook(READ, page, 0,
|
||||
ret = tree->ops->merge_bio_hook(page, 0,
|
||||
PAGE_SIZE,
|
||||
comp_bio, 0);
|
||||
else
|
||||
|
@ -690,8 +690,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
sums += DIV_ROUND_UP(comp_bio->bi_iter.bi_size,
|
||||
root->sectorsize);
|
||||
|
||||
ret = btrfs_map_bio(root, READ, comp_bio,
|
||||
mirror_num, 0);
|
||||
ret = btrfs_map_bio(root, comp_bio, mirror_num, 0);
|
||||
if (ret) {
|
||||
bio->bi_error = ret;
|
||||
bio_endio(comp_bio);
|
||||
|
@ -721,7 +720,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
BUG_ON(ret); /* -ENOMEM */
|
||||
}
|
||||
|
||||
ret = btrfs_map_bio(root, READ, comp_bio, mirror_num, 0);
|
||||
ret = btrfs_map_bio(root, comp_bio, mirror_num, 0);
|
||||
if (ret) {
|
||||
bio->bi_error = ret;
|
||||
bio_endio(comp_bio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue