[PATCH 0/2] nvmet: fix stale log page data and a ZNS Identify error

shao.mingyin at zte.com.cn shao.mingyin at zte.com.cn
Thu Nov 5 05:57:53 PST 2026


This series fixes two issues in the nvmet Identify and Get Log Page
paths.  Both patches are independent and can be applied on their own or
as a subset.

Patch 1 zeroes the unused part of the fixed-size Get Log Page replies.
The transfer length is supplied by the host, and the transports send the
whole buffer back, so a request larger than the log page used to return
stale kernel memory.  It covers the Supported Log Pages, Commands
Supported and Effects, Supported Features, Endurance Group, Reservation
and Rotational Media Information pages, and clamps the Error log ring
walk to the requested length while keeping the most recent error first,
as the specification requires.

Patch 2 returns the namespace lookup error for an Identify command with
CNS 05h and CSI 02h on a namespace that does not exist, instead of
overwriting it with the status of the identify buffer copy.

Both patches were runtime-tested on 7.3.0-next-20261030 (QEMU/TCG
guest).  Patch 1 was tested with an nvmet-tcp target and a file-backed
namespace, using a 4096-byte Get Log Page; patch 2 with the loop
transport and CONFIG_BLK_DEV_ZONED.  The Rotational Media Information
and Reservation log changes of patch 1 are not runtime-tested: the test
guest has no rotational namespace and no persistent-reservation setup.

Signed-off-by: Shao Mingyin <shao.mingyin at zte.com.cn>
---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c



More information about the Linux-nvme mailing list