[PATCH] nvme: fix swapped ZRASF zone state values for full and read only

Damien Le Moal dlemoal at kernel.org
Wed Sep 30 00:34:29 PDT 2026


On 2026/09/29 16:25, Andreas Hindborg wrote:
> From: Karl Bonde Torp <k.torp at samsung.com>
> 
> The Zone Management Receive command Zone Receive Action Specific (ZRASF)
> reporting option values for the Full and Read Only zone states are swapped
> compared to the NVM Express Zoned Namespace Command Set Specification,
> Revision 1.5, Figure 35:

Not only rev 1.5. The same definitions are in all ZNS spec versions.

> 
> - 5h lists the zones in the ZSF:Full state.
> - 6h lists the zones in the ZSRO:Read Only state.
> 
> The nvmet ZNS backend uses these constants to map the ZRASF value received
> from the host to a block layer zone condition when filtering zones in
> Report Zones. Because of the swap, a host asking for full zones was given
> the read only zones, and a host asking for read only zones was given the
> full zones.
> 
> Swap the values of NVME_ZRASF_ZONE_STATE_FULL and
> NVME_ZRASF_ZONE_STATE_READONLY to match the specification.
> 
> Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support")
> Cc: stable at vger.kernel.org
> Signed-off-by: Karl Bonde Torp <k.torp at samsung.com>

Reviewed-by: Damien Le Moal <dlemoal at kernel.org>

-- 
Damien Le Moal
Western Digital Research



More information about the Linux-nvme mailing list