]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: implement non-mdts command limits
authorKeith Busch <kbusch@kernel.org>
Wed, 24 Mar 2021 23:18:05 +0000 (16:18 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 6 Apr 2021 06:34:39 +0000 (08:34 +0200)
commitad059cbf4d5837829116198a964c009292f0adf1
tree10baf33084d873b4a731e59af03f00ea64b3421d
parent702b7f5173e1b81d3b787ccf0ce1cdd71abb4595
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>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
include/linux/nvme.h