diff options
author | Anand Jain <anand.jain@oracle.com> | 2023-04-15 19:32:38 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 13:59:23 +0200 |
commit | adbe7e388e4239d9c1754d475aea791136927137 (patch) | |
tree | 5982561946cd7bb905be3b1fcc156455f330a917 /fs/btrfs/bio.c | |
parent | 29e70be261d92829af26fda16769784710f45503 (diff) |
btrfs: use SECTOR_SHIFT to convert LBA to physical offset
Using SECTOR_SHIFT to convert LBA to physical address makes it more
readable.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r-- | fs/btrfs/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index b3ad0f51e616..2a182edcfb61 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -635,7 +635,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) struct btrfs_fs_info *fs_info = bbio->fs_info; struct btrfs_bio *orig_bbio = bbio; struct bio *bio = &bbio->bio; - u64 logical = bio->bi_iter.bi_sector << 9; + u64 logical = bio->bi_iter.bi_sector << SECTOR_SHIFT; u64 length = bio->bi_iter.bi_size; u64 map_length = length; bool use_append = btrfs_use_zone_append(bbio); |