]> 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)
commit83778a1d476ded2c8eaeb5db4a720e8aed592188
tree10baf33084d873b4a731e59af03f00ea64b3421d
parent72339bd7576214b1a51904ba3530f2f5552a7647
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