linux/drivers/nvme/target
Christoph Hellwig f9d03f96b9 block: improve handling of the magic discard payload
Instead of allocating a single unused biovec for discard requests, send
them down without any payload.  Instead we allow the driver to add a
"special" payload using a biovec embedded into struct request (unioned
over other fields never used while in the driver), and overloading
the number of segments for this case.

This has a couple of advantages:

 - we don't have to allocate the bio_vec
 - the amount of special casing for discard requests in the block
   layer is significantly reduced
 - using this same scheme for other request types is trivial,
   which will be important for implementing the new WRITE_ZEROES
   op on devices where it actually requires a payload (e.g. SCSI)
 - we can get rid of playing games with the request length, as
   we'll never touch it and completions will work just fine
 - it will allow us to support ranged discard operations in the
   future by merging non-contiguous discard bios into a single
   request
 - last but not least it removes a lot of code

This patch is the common base for my WIP series for ranges discards and to
remove discard_zeroes_data in favor of always using REQ_OP_WRITE_ZEROES,
so it would be good to get it in quickly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-12-09 08:30:51 -07:00
..
admin-cmd.c nvmet: add support for the Write Zeroes command 2016-12-01 07:58:40 -07:00
configfs.c nvme-fabrics: patch target code in prep for FC transport support 2016-12-06 10:17:03 +02:00
core.c nvmet: Fix possible infinite loop triggered on hot namespace removal 2016-12-06 10:17:03 +02:00
discovery.c
fabrics-cmd.c nvme: introduce struct nvme_request 2016-11-10 10:06:24 -07:00
fc.c nvme-fabrics: Add target support for FC transport 2016-12-06 10:17:56 +02:00
fcloop.c nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
io-cmd.c nvmet: add support for the Write Zeroes command 2016-12-01 07:58:40 -07:00
Kconfig nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
loop.c block: improve handling of the magic discard payload 2016-12-09 08:30:51 -07:00
Makefile nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
nvmet.h nvmet: Fix possible infinite loop triggered on hot namespace removal 2016-12-06 10:17:03 +02:00
rdma.c nvmet-rdma: align to generic ib_event logging helper 2016-12-06 10:17:03 +02:00