On Wed, Mar 03, 2021 at 05:55:46PM +0900, Naohiro Aota wrote: > We need to use sector_t for zone_sectors, or it set the zone size = 0 when > the size >= 4GB (= 2^24 sectors) by shifting the zone_sectors value by > SECTOR_SHIFT. This does not fix the same bug in btrfs_sb_log_location_bdev. > Fixes: 5b316468983d ("btrfs: get zone information of zoned block devices") > Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx> > --- > fs/btrfs/zoned.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c > index 9a5cf153da89..1324bb6c3946 100644 > --- a/fs/btrfs/zoned.c > +++ b/fs/btrfs/zoned.c > @@ -269,7 +269,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device) > sector_t sector = 0; > struct blk_zone *zones = NULL; > unsigned int i, nreported = 0, nr_zones; > - unsigned int zone_sectors; > + sector_t zone_sectors; > char *model, *emulated; > int ret; > > -- > 2.30.1