summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-10-30 16:50:15 +0100
committerChristoph Hellwig <hch@lst.de>2022-11-15 10:50:31 +0100
commit1b96f862ecccb3e6f950eba584bebf22955cecc5 (patch)
tree85ca6d248f86146a2d487a0c90fbc1280e179124 /include/linux/nvme.h
parente4fbcf32c860f98103ca7f1dc8c0dc69e2219ec6 (diff)
downloadlinux-1b96f862ecccb3e6f950eba584bebf22955cecc5.tar.bz2
nvme: implement the DEAC bit for the Write Zeroes command
While the specification allows devices to either deallocate data or to actually write zeroes on any Write Zeroes command, many SSDs only do the sensible thing and deallocate data when the DEAC bit is specific. Set it when it is supported and the caller doesn't explicitly opt out of deallocation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 1d102b662e88..d6be2a686100 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -964,6 +964,7 @@ enum {
NVME_RW_PRINFO_PRCHK_GUARD = 1 << 12,
NVME_RW_PRINFO_PRACT = 1 << 13,
NVME_RW_DTYPE_STREAMS = 1 << 4,
+ NVME_WZ_DEAC = 1 << 9,
};
struct nvme_dsm_cmd {