[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220518112140.GI18596@twin.jikos.cz>
Date: Wed, 18 May 2022 13:21:40 +0200
From: David Sterba <dsterba@...e.cz>
To: Pankaj Raghav <p.raghav@...sung.com>
Cc: dsterba@...e.cz, axboe@...nel.dk, damien.lemoal@...nsource.wdc.com,
pankydev8@...il.com, dsterba@...e.com, hch@....de,
linux-nvme@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
linux-btrfs@...r.kernel.org, jiangbo.365@...edance.com,
linux-block@...r.kernel.org, gost.dev@...sung.com,
linux-kernel@...r.kernel.org, dm-devel@...hat.com,
Luis Chamberlain <mcgrof@...nel.org>
Subject: Re: [PATCH v4 07/13] btrfs: zoned: use generic btrfs zone helpers to
support npo2 zoned devices
On Wed, May 18, 2022 at 11:40:22AM +0200, Pankaj Raghav wrote:
> On 2022-05-17 14:30, David Sterba wrote:
> > On Mon, May 16, 2022 at 06:54:10PM +0200, Pankaj Raghav wrote:
> >> @@ -1108,14 +1101,14 @@ int btrfs_reset_device_zone(struct btrfs_device *device, u64 physical,
> >> int btrfs_ensure_empty_zones(struct btrfs_device *device, u64 start, u64 size)
> >> {
> >> struct btrfs_zoned_device_info *zinfo = device->zone_info;
> >> - const u8 shift = zinfo->zone_size_shift;
> >> - unsigned long begin = start >> shift;
> >> - unsigned long end = (start + size) >> shift;
> >> + unsigned long begin = bdev_zone_no(device->bdev, start >> SECTOR_SHIFT);
> >> + unsigned long end =
> >> + bdev_zone_no(device->bdev, (start + size) >> SECTOR_SHIFT);
> >
> > There are unsinged long types here though I'd rather see u64, better for
> > a separate patch. Fixed width types are cleaner here and in the zoned
> > code as there's always some conversion to/from sectors.
> >
> Ok. I will probably send a separate patch to convert them to fix width
> types. Is it ok if I do it as a separate patch instead of including it
> in this series?
Yes, it's a cleanup for later, not directly introduced or affecting this
patchset. I've checked zoned.c, in btrfs_ensure_empty_zones it's the
only instance so it's not some widespread problem.
Powered by blists - more mailing lists