Linux block layer
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Ankit Gupta <ankit6791@gmail.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH blktests] nvme/080: test write zeroes larger than 65536 logical blocks
Date: Tue, 17 Nov 2026 19:45:07 +0000	[thread overview]
Message-ID: <fe076b84-dbe7-4863-8d55-d1b385123f57@nvidia.com> (raw)
In-Reply-To: <20261117052741.25471-1-ankit6791@gmail.com>

On 11/16/26 9:26 PM, Ankit Gupta wrote:
> The NVMe Write Zeroes command encodes the number of logical blocks in a
> zero-based 16-bit field. When the controller reports neither MDTS nor
> WZSL, as nvmet-tcp does by default, the host advertised an unbounded
> write zeroes limit, truncated the block count when building the command
> and completed the request successfully after zeroing only a prefix.
>
> Add a regression test for the kernel patch "nvme: limit Write Zeroes to
> 65536 logical blocks" [1]. Fill 65536 logical blocks plus 1 MiB with a
> non-zero pattern, zero that range with blkdiscard -z and check that the
> whole range reads back as zeroes. The length scales with the logical
> block size, so the test covers both 512-byte and 4096-byte namespaces.
>
> [1]https://lore.kernel.org/linux-nvme/20261117011230.10288-1-ankit6791@gmail.com/
>
> Signed-off-by: Ankit Gupta<ankit6791@gmail.com>
> ---
> Tested on arm64 with v7.4-rc3 (aebb72744764), NVMET_TRTYPES="loop tcp"
> and NVMET_BLKDEV_TYPES="device file". Without the kernel patch the test
> fails for tcp with both block device types ("zeroed range still contains
> non-zero data"). With the patch it passes for tcp and loop with both
> types. The device type gives 512-byte logical blocks (33 MiB zeroed) and
> the file type 4096-byte logical blocks (257 MiB zeroed). With
> NVME_IMG_SIZE=64m the device type still runs and the file type is
> skipped.
>
> Claude and Codex assisted with writing and validating this test.

Thanks a lot for the test, overall looks good to me.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



  reply	other threads:[~2026-11-17 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  5:26 [PATCH blktests] nvme/080: test write zeroes larger than 65536 logical blocks Ankit Gupta
2026-11-17 19:45 ` Chaitanya Kulkarni [this message]
2026-11-21  2:05 ` Shin'ichiro Kawasaki

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=fe076b84-dbe7-4863-8d55-d1b385123f57@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=ankit6791@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=shinichiro.kawasaki@wdc.com \
    /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