From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C544F4F68AB; Tue, 13 Oct 2026 12:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791893021; cv=none; b=s2oYfBJMGYXNc3qWL2sQQ3k6uvZvH8rtm+ivW5BAXK2BoJinyMaXxrIoK/kzrG3iDRv7MJ8XObgSrKVcMD2D3YjO8NSZsfUjEcb2cb9HcMSgXgEerNcMKAT2vKslK5o+GAP+eCM7uFVPVkxfYwMgf9d8x/mSZWH/GEVQctXBfKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791893021; c=relaxed/simple; bh=JqGj1yXxu8zHIiUvo6k1V+Tprnw/IMZlm0spveM6+RQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KZs71SDu+DReNJBYOZ1dJaBhyQpWXktWAgdZcd+uYHX/w6+0DQfVuYVGjb8qw57xWVgAAw5Y9VtKkqCTVWH7UgFf/iEfELmM7PQMx6u+wBouaaxuFPrNtVSJHmdg/FNg1aKyC0vBxgS+d/t7fvnv71S/eY6eqgzcoiKFJVG04Fs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2ttl2yLZ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2ttl2yLZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D30401F000FF; Tue, 13 Oct 2026 12:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791893020; bh=FhMaW8WSScV6vGAU/Ko+k8cp+08cir9fF6WqegVMT1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2ttl2yLZOJHqTg8XXLkL1zFW4XD9isx75cubYTskFZGV03VnIaL1WbKSWAErOL0c1 rMviSCVdQ8saPG9GusXoF9MPwu24bcJ34td9ug5T4O+TMl6hlGgtqjdNPJOxmzckKP pMffkV9i1MWLfShtKNUhMEQrCaBNTxlzUpSEEF5I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Damien Le Moal , Karl Bonde Torp , Andreas Hindborg , Keith Busch Subject: [PATCH 6.18 086/621] nvme: fix swapped ZRASF zone state values for full and read only Date: Tue, 13 Oct 2026 13:31:21 +0200 Message-ID: <20261013112922.896035100@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112920.855194808@linuxfoundation.org> References: <20261013112920.855194808@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Karl Bonde Torp commit 564e46d9f6e87912effa03f123d37a511d520f09 upstream. 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: - 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@vger.kernel.org Reviewed-by: Damien Le Moal Signed-off-by: Karl Bonde Torp Signed-off-by: Andreas Hindborg Signed-off-by: Keith Busch Signed-off-by: Greg Kroah-Hartman --- include/linux/nvme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -1255,8 +1255,8 @@ enum { NVME_ZRASF_ZONE_STATE_IMP_OPEN = 0x02, NVME_ZRASF_ZONE_STATE_EXP_OPEN = 0x03, NVME_ZRASF_ZONE_STATE_CLOSED = 0x04, - NVME_ZRASF_ZONE_STATE_READONLY = 0x05, - NVME_ZRASF_ZONE_STATE_FULL = 0x06, + NVME_ZRASF_ZONE_STATE_FULL = 0x05, + NVME_ZRASF_ZONE_STATE_READONLY = 0x06, NVME_ZRASF_ZONE_STATE_OFFLINE = 0x07, NVME_REPORT_ZONE_PARTIAL = 1, };