]> git.hungrycats.org Git - linux/commitdiff
nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
authorBoyang Yu <yuboyang@dapustor.com>
Mon, 17 Jun 2024 13:11:44 +0000 (21:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:33 +0000 (09:53 +0200)
[ Upstream commit 9570a48847e3acfa1a741cef431c923325ddc637 ]

The value of NVME_NS_DEAC is 3,
which means NVME_NS_METADATA_SUPPORTED | NVME_NS_EXT_LBAS. Provide a
unique value for this feature flag.

Fixes 1b96f862eccc ("nvme: implement the DEAC bit for the Write Zeroes command")
Signed-off-by: Boyang Yu <yuboyang@dapustor.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/nvme.h

index d7bcc6d51e84e9f462a4578d7dadadc5e21fac13..3f2b0d41e48196241321b940c941cc37936e537f 100644 (file)
@@ -503,7 +503,7 @@ static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
 enum nvme_ns_features {
        NVME_NS_EXT_LBAS = 1 << 0, /* support extended LBA format */
        NVME_NS_METADATA_SUPPORTED = 1 << 1, /* support getting generated md */
-       NVME_NS_DEAC          /* DEAC bit in Write Zeores supported */
+       NVME_NS_DEAC = 1 << 2,          /* DEAC bit in Write Zeores supported */
 };
 
 struct nvme_ns {