OpenCloudOS-Kernel/drivers/nvme/host
Chaitanya Kulkarni 6e02318eae nvme: add support for the Write Zeroes command
Allow write zeroes operations (REQ_OP_WRITE_ZEROES) on the block
device, if the device supports an optional command bit set for write
zeroes. Add support to setup write zeroes command. Set maximum possible
write zeroes sectors in one write zeroes command according to
nvme write zeroes command definition.

This patch was posted as a part of block-write-zeroes support
implementation (https://patchwork.kernel.org/patch/9454859/),
but did not make into mainline kernel as it got reverted due to
failure on the Linus's machine.

In this patch in order to be more cautious, we use NVMe controller's
maximum hardware sector size which is calculated based on the
controller's MDTS (Maximum Data Transfer Size) field to calculate
the maximum sectors for the write zeroes request.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
[folded a fix from Keith Busch to properly respect
 NVME_QUIRK_DEALLOCATE_ZEROES]
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-02-04 15:41:25 +01:00
..
Kconfig nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
core.c nvme: add support for the Write Zeroes command 2019-02-04 15:41:25 +01:00
fabrics.c nvme-fabrics: unset write/poll queues for discovery controllers 2019-01-09 13:47:06 -05:00
fabrics.h nvme-fabrics: allow user to pass in nr_poll_queues 2018-12-18 17:50:49 +01:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fabrics: allow nvmf_connect_io_queue to poll 2018-12-18 17:50:48 +01:00
lightnvm.c nvme: remove nvme_common command cdw10 array 2018-12-13 09:59:01 +01:00
multipath.c nvme-multipath: drop optimization for static ANA group IDs 2019-01-23 17:16:59 -07:00
nvme.h nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN 2019-01-09 13:47:08 -05:00
pci.c for-linus-20190118 2019-01-20 09:12:50 +12:00
rdma.c nvme-rdma: rework queue maps handling 2019-01-23 17:16:59 -07:00
tcp.c nvme-tcp: fix timeout handler 2019-01-23 17:16:59 -07:00
trace.c nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00
trace.h nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00