]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: use sector_t for zone sectors
authorNaohiro Aota <naohiro.aota@wdc.com>
Wed, 3 Mar 2021 08:55:46 +0000 (17:55 +0900)
committerDavid Sterba <dsterba@suse.com>
Thu, 4 Mar 2021 15:16:55 +0000 (16:16 +0100)
commit1f5df5d48a58a48cc3789868ea448c3983681a12
tree018cb1ae1b40a6acc0a4154e0ead48259ad40f7f
parent5aac5b72d6420d86c05001972213660b5bc00b11
btrfs: zoned: use sector_t for zone sectors

We need to use sector_t for zone_sectors, or it would set the zone size
to zero when the size >= 4GB (= 2^24 sectors) by shifting the
zone_sectors value by SECTOR_SHIFT. We're assuming zones sizes up to
8GiB.

Fixes: 1ac28cd685a3 ("btrfs: get zone information of zoned block devices")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c