NVMe: Add discard support for capable devices
authorKeith Busch <keith.busch@intel.com>
Fri, 9 Nov 2012 23:33:05 +0000 (16:33 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Tue, 26 Mar 2013 18:18:58 +0000 (14:18 -0400)
commit0e5e4f0e56aca0df1d5648db0be9028bd573b25c
treea83ab74e90bae5e0a20e6fd9dd03924cac1f3db9
parenta12183c62717ac4579319189a00f5883a18dff08
NVMe: Add discard support for capable devices

This adds discard support to block queues if the nvme device is capable of
deallocating blocks as indicated by the controller's optional command support.
A discard flagged bio request will submit an NVMe deallocate Data Set
Management command for the requested blocks.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c
include/linux/nvme.h