nvmet: ignore EOPNOTSUPP for discard
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Mar 2019 17:55:09 +0000 (18:55 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Mar 2019 18:57:34 +0000 (12:57 -0600)
commit005c674f705ee308e23b8e4e7047419d12122fde
tree6d506ce9e8786efd605ee03b88b42f46c3460b9f
parent9f0916ab932f676c042d4592a235a895847484f2
nvmet: ignore EOPNOTSUPP for discard

NVMe DSM is a pure hint, so if the underlying device / file system
does not support discard-like operations we should not fail the
operation but rather return success.

Fixes: 3b031d15995f ("nvmet: add error log support for bdev backend")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tested-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/io-cmd-file.c