scsi: sd: Remove LBPRZ dependency for discards
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 5 Apr 2017 17:21:25 +0000 (19:21 +0200)
committerJens Axboe <axboe@fb.com>
Sat, 8 Apr 2017 17:25:38 +0000 (11:25 -0600)
commitbcd069bb250acf6088b60d189ab3ec3ae8dd11a5
tree23e889a930b66d402e796a1e173ed6375c5f0e1c
parente6bd931284b4b9bc17a2995257a0769370bc5202
scsi: sd: Remove LBPRZ dependency for discards

Separating discards and zeroout operations allows us to remove the LBPRZ
block zeroing constraints from discards and honor the device preferences
for UNMAP commands.

If supported by the device, we'll also choose UNMAP over one of the
WRITE SAME variants for discards.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/scsi/sd.c