nvme: support ranged discard requests

NVMe supports up to 256 ranges per DSM command, so wire up support
for ranged discards up to that limit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Christoph Hellwig
2017-02-08 14:46:50 +01:00
committed by Jens Axboe
parent 1e739730c5
commit b35ba01ea6
2 changed files with 25 additions and 7 deletions

View File

@@ -553,6 +553,8 @@ enum {
NVME_DSMGMT_AD = 1 << 2,
};
#define NVME_DSM_MAX_RANGES 256
struct nvme_dsm_range {
__le32 cattr;
__le32 nlb;