lkml.org 
[lkml]   [2022]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 8/8] dm: ensure only power of 2 zone sizes are allowed
From
On 5/26/22 00:49, Pankaj Raghav wrote:
> Ensure that only power of 2 zoned devices are enabled for dm targets that
> supports zoned devices. This constraint can be relaxed once non power of
> 2 zone size support is added to the DM layer.
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> ---
> drivers/md/dm-table.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 03541cfc2317..2a8af70d1d4a 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -251,6 +251,12 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
> if (bdev_is_zoned(bdev)) {
> unsigned int zone_sectors = bdev_zone_sectors(bdev);
>
> + if (!is_power_of_2(zone_sectors)) {
> + DMWARN("%s: %pg only power of two zone size supported",
> + dm_device_name(ti->table->md), bdev);
> + return 1;
> + }
> +
> if (start & (zone_sectors - 1)) {
> DMWARN("%s: start=%llu not aligned to h/w zone size %u of %pg",
> dm_device_name(ti->table->md),

I thought the agreed upon idea is be to add a dm-linear like target to
emulate power of 2 zone size so that we can keep btrfs and f2fs running on
this new class of device. So why this patch ?

The entire series as is will fragment zoned block device support, which is
not a good thing at all. Without the new dm target, none of the current
kernel supported zone stuff will work.

The zonefs patch is also gone from the series. Why ? As is, zonefs will
break if it is passed a non power of 2 zone size drive.

--
Damien Le Moal
Western Digital Research

\
 
 \ /
  Last update: 2022-05-26 01:15    [W:1.408 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site