The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: shao.mingyin@zte.com.cn
Cc: kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/5] nvme: zns: reject an out-of-range zone append size limit
Date: Fri, 20 Nov 2026 18:49:14 +0100	[thread overview]
Message-ID: <20261120174914.GA1484@lst.de> (raw)
In-Reply-To: <20261115012752774qFGtgUXwZKwN-2LDj0D80@zte.com.cn>

On Sun, Nov 15, 2026 at 01:27:52AM +0800, shao.mingyin@zte.com.cn wrote:
> 
> diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c
> index e31ec6f4f94f..c34015e68f81 100644
> --- a/drivers/nvme/host/zns.c
> +++ b/drivers/nvme/host/zns.c
> @@ -27,10 +27,15 @@ static int nvme_set_max_append(struct nvme_ctrl *ctrl)
>  		return status;
>  	}
>  
> -	if (id->zasl)
> -		ctrl->max_zone_append = 1 << (id->zasl + 3);
> -	else
> +	if (id->zasl && id->zasl + 3 < 32) {
> +		ctrl->max_zone_append = 1U << (id->zasl + 3);
> +	} else {
> +		if (id->zasl)
> +			dev_warn(ctrl->device,
> +				 "invalid zone append size limit %u\n",
> +				 id->zasl);

This warning triggers for perfectly valid values that we just can't
express.  I think we can just drop it.


  reply	other threads:[~2026-11-20 17:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 17:27 [PATCH 0/5] nvme: validate and decode controller supplied values shao.mingyin
2026-11-14 17:27 ` [PATCH 1/5] nvme: zns: reject an out-of-range zone append size limit shao.mingyin
2026-11-20 17:49   ` Christoph Hellwig [this message]
2026-11-14 17:27 ` [PATCH 2/5] nvme: map passthrough data when the length is nonzero shao.mingyin
2026-11-20 17:50   ` Christoph Hellwig
2026-11-20 18:03   ` Caleb Sander Mateos
2026-11-14 17:27 ` [PATCH 3/5] nvmet: validate the LBA format count of a passthrough namespace shao.mingyin
2026-11-20 17:50   ` Christoph Hellwig
2026-11-14 17:27 ` [PATCH 4/5] nvme: decode the FDP Get Features result as a dword shao.mingyin
2026-11-20 17:52   ` Christoph Hellwig
2026-11-14 17:27 ` [PATCH 5/5] nvme: bound the reservation report retry loop shao.mingyin
2026-11-20 17:52   ` Christoph Hellwig
2026-11-20 19:54 ` (subset) [PATCH 0/5] nvme: validate and decode controller supplied values Keith Busch

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=20261120174914.GA1484@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=shao.mingyin@zte.com.cn \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox