diff options
author | Keith Busch <kbusch@kernel.org> | 2021-03-24 16:18:05 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-04-06 08:34:39 +0200 |
commit | 5befc7c26e5a98cd49789fb1beb52c62bd472dba (patch) | |
tree | 10baf33084d873b4a731e59af03f00ea64b3421d /drivers/nvme/host/nvme.h | |
parent | c881a23fb6f7eb901155d25ba8dd1af0b8c7923b (diff) | |
download | linux-5befc7c26e5a98cd49789fb1beb52c62bd472dba.tar.bz2 |
nvme: implement non-mdts command limits
Commands that access LBA contents without a data transfer between the
host historically have not had a spec defined upper limit. The driver
set the queue constraints for such commands to the max data transfer
size just to be safe, but this artificial constraint frequently limits
devices below their capabilities.
The NVMe Workgroup ratified TP4040 defines how a controller may
advertise their non-MDTS limits. Use these if provided and default to
the current constraints if not. Since the Dataset Management command
limits are defined in logical blocks, but without a namespace to tell us
the logical block size, the code defaults to the safe 512b size.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index b0863c59fac4..815c032a190e 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -276,6 +276,9 @@ struct nvme_ctrl { u32 max_hw_sectors; u32 max_segments; u32 max_integrity_segments; + u32 max_discard_sectors; + u32 max_discard_segments; + u32 max_zeroes_sectors; #ifdef CONFIG_BLK_DEV_ZONED u32 max_zone_append; #endif |