Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] nvme: zns: cap zone report nr_zones by DMA buffer size
@ 2026-06-24  5:53 Xixin Liu
  2026-06-24  5:53 ` [PATCH v1 1/1] " Xixin Liu
  2026-06-25  2:00 ` [PATCH v2 0/2] " Xixin Liu
  0 siblings, 2 replies; 8+ messages in thread
From: Xixin Liu @ 2026-06-24  5:53 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, axboe, hch, sagi, linux-kernel, liuxixin

Hi,

The ZNS host driver issues Zone Management Receive with Partial Report
(PR=1) fixed.  The Number of Zones (NZ) field in the report header must
reflect the zone descriptors actually transferred in the DMA buffer (ZNS
Command Set Specification Rev 1.2, section 3.4.2).

nvme_ns_report_zones() caps the parse loop by the device-reported NZ and
the caller's nr_zones limit, but not by the number of descriptors that fit
in buflen.  Cap nz with min3(device NZ, nr_zones - zone_idx, max_in_buf).

Thanks,
Xixin Liu

---

Xixin Liu (1):
  nvme: zns: cap zone report nr_zones by DMA buffer size

 drivers/nvme/host/zns.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-26  4:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24  5:53 [PATCH v1 0/1] nvme: zns: cap zone report nr_zones by DMA buffer size Xixin Liu
2026-06-24  5:53 ` [PATCH v1 1/1] " Xixin Liu
2026-06-25 11:59   ` Christoph Hellwig
2026-06-25  2:00 ` [PATCH v2 0/2] " Xixin Liu
2026-06-25  2:00   ` [PATCH v2 1/2] " Xixin Liu
2026-06-26  4:49     ` Christoph Hellwig
2026-06-25  2:00   ` [PATCH v2 2/2] nvme: zns: include zone index in invalid zone type error Xixin Liu
2026-06-26  4:50     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox