]> git.ipfire.org Git - thirdparty/linux.git/commit
nvmet: report NPDGL and NPDAL
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 27 Feb 2026 20:23:53 +0000 (13:23 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:05 +0000 (07:35 -0700)
commitc4cfe8c328aee9e3519a04810480ce8e1fcaeeb7
treeafe024615acd8df4115c47c6498ed1286e236aec
parente0d56e7055d3762732504eddc059a4a142227e0f
nvmet: report NPDGL and NPDAL

A block device with a very large discard_granularity queue limit may not
be able to report it in the 16-bit NPDG and NPDA fields in the Identify
Namespace data structure. For this reason, version 2.1 of the NVMe specs
added 32-bit fields NPDGL and NPDAL to the NVM Command Set Specific
Identify Namespace structure. So report the discard_granularity there
too and set OPTPERF to 11b to indicate those fields are supported.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/nvmet.h