mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
btrfs: zoned: drop redundant check for REQ_OP_ZONE_APPEND and btrfs_is_zoned
REQ_OP_ZONE_APPEND can only work on zoned devices, so it is redundant to check if the filesystem is zoned when REQ_OP_ZONE_APPEND is set as the bio's bio_op. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
554aed7da2
commit
7367271000
1 changed files with 2 additions and 3 deletions
|
@ -3283,8 +3283,7 @@ static int calc_bio_boundaries(struct btrfs_bio_ctrl *bio_ctrl,
|
||||||
else
|
else
|
||||||
bio_ctrl->len_to_stripe_boundary = (u32)geom.len;
|
bio_ctrl->len_to_stripe_boundary = (u32)geom.len;
|
||||||
|
|
||||||
if (!btrfs_is_zoned(fs_info) ||
|
if (bio_op(bio_ctrl->bio) != REQ_OP_ZONE_APPEND) {
|
||||||
bio_op(bio_ctrl->bio) != REQ_OP_ZONE_APPEND) {
|
|
||||||
bio_ctrl->len_to_oe_boundary = U32_MAX;
|
bio_ctrl->len_to_oe_boundary = U32_MAX;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3339,7 +3338,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
|
||||||
bio_set_dev(bio, bdev);
|
bio_set_dev(bio, bdev);
|
||||||
wbc_init_bio(wbc, bio);
|
wbc_init_bio(wbc, bio);
|
||||||
}
|
}
|
||||||
if (btrfs_is_zoned(fs_info) && bio_op(bio) == REQ_OP_ZONE_APPEND) {
|
if (bio_op(bio) == REQ_OP_ZONE_APPEND) {
|
||||||
struct btrfs_device *device;
|
struct btrfs_device *device;
|
||||||
|
|
||||||
device = btrfs_zoned_get_device(fs_info, disk_bytenr,
|
device = btrfs_zoned_get_device(fs_info, disk_bytenr,
|
||||||
|
|
Loading…
Reference in a new issue