Skip to content

Commit

Permalink
nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
Browse files Browse the repository at this point in the history
[ Upstream commit 9570a48 ]

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 1b96f86 ("nvme: implement the DEAC bit for the Write Zeroes command")
Signed-off-by: Boyang Yu <[email protected]>
Reviewed-by: Kanchan Joshi <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
byyuDapu authored and gregkh committed Jul 25, 2024
1 parent 21cb9c4 commit e7ba466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,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 {
Expand Down

0 comments on commit e7ba466

Please sign in to comment.