All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>
Cc: Mike Snitzer <snitzer@kernel.org>,
	dm-devel@lists.linux.dev, bo.wu@vivo.com
Subject: Re: [PATCH] dm-table:remove the restriction on zone sector being align to pow2
Date: Mon, 29 Apr 2024 14:51:55 -0400	[thread overview]
Message-ID: <Zi_sSyu7CWdFS_v7@redhat.com> (raw)
In-Reply-To: <20240429025029.1620-1-liaoyuanhong@vivo.com>

On Mon, Apr 29, 2024 at 10:50:29AM +0800, Liao Yuanhong wrote:
> For zoned-UFS, sector size may not aligned to pow2, so we need to remove 
> the pow2 limitation.

When was non-power-of-2 support added to zone devices? AFAIK, the last
attempt to add support for it was:

https://lore.kernel.org/dm-devel/20220923173618.6899-2-p.raghav@samsung.com/

Which was not merged. See that email thread for other necessary dm
changes to support this.

-Ben

> 
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
>  drivers/md/dm-table.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 41f1d731ae5a..823f2f6a2d53 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -1663,10 +1663,6 @@ static int validate_hardware_zoned(struct dm_table *t, bool zoned,
>  		return -EINVAL;
>  	}
>  
> -	/* Check zone size validity and compatibility */
> -	if (!zone_sectors || !is_power_of_2(zone_sectors))
> -		return -EINVAL;
> -
>  	if (dm_table_any_dev_attr(t, device_not_matches_zone_sectors, &zone_sectors)) {
>  		DMERR("%s: zone sectors is not consistent across all zoned devices",
>  		      dm_device_name(t->md));
> -- 
> 2.25.1
> 


  reply	other threads:[~2024-04-29 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  2:50 [PATCH] dm-table:remove the restriction on zone sector being align to pow2 Liao Yuanhong
2024-04-29 18:51 ` Benjamin Marzinski [this message]
2024-04-30  3:32   ` Liao Yuanhong
2024-04-30 22:35     ` Benjamin Marzinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zi_sSyu7CWdFS_v7@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=bo.wu@vivo.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=liaoyuanhong@vivo.com \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.