btrfs: Remove bio_offset argument from submit_bio_hook
None of the implementers of the submit_bio_hook use the bio_offset parameter, simply remove it. No functional changes. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e68f2ee721
commit
50489a5734
|
@ -885,8 +885,8 @@ static int check_async_write(struct btrfs_inode *bi)
|
||||||
}
|
}
|
||||||
|
|
||||||
static blk_status_t btree_submit_bio_hook(struct inode *inode, struct bio *bio,
|
static blk_status_t btree_submit_bio_hook(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num,
|
||||||
u64 bio_offset)
|
unsigned long bio_flags)
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||||
int async = check_async_write(BTRFS_I(inode));
|
int async = check_async_write(BTRFS_I(inode));
|
||||||
|
|
|
@ -149,19 +149,13 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
|
||||||
unsigned long bio_flags)
|
unsigned long bio_flags)
|
||||||
{
|
{
|
||||||
blk_status_t ret = 0;
|
blk_status_t ret = 0;
|
||||||
struct bio_vec *bvec = bio_last_bvec_all(bio);
|
|
||||||
struct bio_vec bv;
|
|
||||||
struct extent_io_tree *tree = bio->bi_private;
|
struct extent_io_tree *tree = bio->bi_private;
|
||||||
u64 start;
|
|
||||||
|
|
||||||
mp_bvec_last_segment(bvec, &bv);
|
|
||||||
start = page_offset(bv.bv_page) + bv.bv_offset;
|
|
||||||
|
|
||||||
bio->bi_private = NULL;
|
bio->bi_private = NULL;
|
||||||
|
|
||||||
if (tree->ops)
|
if (tree->ops)
|
||||||
ret = tree->ops->submit_bio_hook(tree->private_data, bio,
|
ret = tree->ops->submit_bio_hook(tree->private_data, bio,
|
||||||
mirror_num, bio_flags, start);
|
mirror_num, bio_flags);
|
||||||
else
|
else
|
||||||
btrfsic_submit_bio(bio);
|
btrfsic_submit_bio(bio);
|
||||||
|
|
||||||
|
@ -2546,7 +2540,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
|
||||||
read_mode, failrec->this_mirror, failrec->in_validation);
|
read_mode, failrec->this_mirror, failrec->in_validation);
|
||||||
|
|
||||||
status = tree->ops->submit_bio_hook(tree->private_data, bio, failrec->this_mirror,
|
status = tree->ops->submit_bio_hook(tree->private_data, bio, failrec->this_mirror,
|
||||||
failrec->bio_flags, 0);
|
failrec->bio_flags);
|
||||||
if (status) {
|
if (status) {
|
||||||
free_io_failure(failure_tree, tree, failrec);
|
free_io_failure(failure_tree, tree, failrec);
|
||||||
bio_put(bio);
|
bio_put(bio);
|
||||||
|
|
|
@ -105,8 +105,7 @@ struct extent_io_ops {
|
||||||
* pointer will be called unconditionally.
|
* pointer will be called unconditionally.
|
||||||
*/
|
*/
|
||||||
blk_status_t (*submit_bio_hook)(struct inode *inode, struct bio *bio,
|
blk_status_t (*submit_bio_hook)(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num, unsigned long bio_flags);
|
||||||
u64 bio_offset);
|
|
||||||
int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset,
|
int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset,
|
||||||
struct page *page, u64 start, u64 end,
|
struct page *page, u64 start, u64 end,
|
||||||
int mirror);
|
int mirror);
|
||||||
|
|
|
@ -1954,8 +1954,9 @@ static blk_status_t btrfs_submit_bio_start(void *private_data, struct bio *bio,
|
||||||
* c-3) otherwise: async submit
|
* c-3) otherwise: async submit
|
||||||
*/
|
*/
|
||||||
static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
|
static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num,
|
||||||
u64 bio_offset)
|
unsigned long bio_flags)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||||
|
|
Loading…
Reference in New Issue