]> www.infradead.org Git - nvme.git/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)
committerKeith Busch <kbusch@kernel.org>
Mon, 17 Jun 2024 18:24:12 +0000 (11:24 -0700)
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>
drivers/nvme/host/nvme.h

index f3a41133ac3f9745ee98fcc109710ee8a2988cc2..68b400f9c42d512323e483ec22afc6956cc09f97 100644 (file)
@@ -502,7 +502,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 {