[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f3ec55d3-f1fe-1875-f8e7-f7c46d89b065@samsung.com>
Date: Thu, 11 Aug 2022 15:17:46 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
<Johannes.Thumshirn@....com>, <snitzer@...nel.org>,
<axboe@...nel.dk>, <agk@...hat.com>, <hch@....de>
CC: <dm-devel@...hat.com>, <matias.bjorling@....com>,
<gost.dev@...sung.com>, <linux-kernel@...r.kernel.org>,
<pankydev8@...il.com>, <jaegeuk@...nel.org>, <hare@...e.de>,
<linux-block@...r.kernel.org>, <linux-nvme@...ts.infradead.org>,
<bvanassche@....org>, Damien Le Moal <damien.lemoal@....com>
Subject: Re: [PATCH v9 13/13] dm: add power-of-2 target for zoned devices
with non power-of-2 zone sizes
>> +==========
>> +dm-po2zone
>> +==========
>> +The dm-po2zone device mapper target exposes a zoned block device with a
>> +non-power-of-2(npo2) zone number of sectors as a power-of-2(po2) zone number
>
> s/zone number of sectors/number of sectors per zone (zone size)
>
>> +of sectors.
>> +The filesystems that support zoned block devices such as F2FS and BTRFS
>> +assume po2 zone size sectors as the kernel has traditionally only supported
>> +those devices. However, as the kernel now supports zoned block devices with
>> +npo2 zone size sectors, the dm-po2zone target can be used by the filesystems
>> +before adding native support.
>
> filesystems will not "use" the target. The user has to set up the target first
> and the filesystem will run on top of it. Detail, but rewording this make it
> clear that this is not an automatic thing magically happening.
>
> Not that your patch series is lacking f2fs and btrfs patches to check for the
> power of 2 zone size of the zoned device. Unless these checks are already in place ?
>
btrfs already had these checks in place and f2fs patch to allow only po2
zone size was already merged by Jaegeuk.
7f262f737502 ("f2fs: ensure only power of 2 zone sizes are allowed")
>> +
>> +Partial mapping of the underlying device is not supported by this target.
>> +
>> +Algorithm
>> +=========
>> +The device mapper target maps the underlying device's zone size to the
>> +zone capacity and changes the zone size to the nearest po2 number of sectors.
>> +The gap between the zone capacity and the zone size is emulated in the target.
>> +E.g., a zoned block device with a zone size (and capacity) of 3M will have an
>> +equivalent target layout with mapping as follows:
>> +
>> +::
>> +
>> + 0M 3M 4M 6M 8M
>> + | | | | |
>> + +x------------+--+x---------+--+x------- Target
>> + |x | |x | |x
>> + x x x
>> + x x x
>> + x x x
>> + x x x
>> + |x |x |x
>> + +x------------+x------------+x---------- Device
>> + | | |
>> + 0M 3M 6M
>> +
Powered by blists - more mailing lists