nvmet: add support for the Write Zeroes command
authorChaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Wed, 30 Nov 2016 20:29:02 +0000 (12:29 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 1 Dec 2016 14:58:40 +0000 (07:58 -0700)
commitd262920998c891dfd87cf73f823f0ff60e20cdad
tree3d612a7f233c8d714d5a23546e767211093fcf7c
parent6d31e3ba232ea22458b2f36b6d3f2f9f11bf3fa4
nvmet: add support for the Write Zeroes command

Add support for handling write zeroes command on target.
Call into __blkdev_issue_zeroout, which the block layer expands into the
best suitable variant of zeroing the LBAs. Allow write zeroes operation
to deallocate the LBAs when calling __blkdev_issue_zeroout.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/io-cmd.c