block: better deal with the delayed not supported case in blk_cloned_rq_check_limits
authorRitika Srivastava <ritika.srivastava@oracle.com>
Tue, 1 Sep 2020 20:17:31 +0000 (13:17 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 01:38:33 +0000 (19:38 -0600)
commit8327cce5ff9376fac9ff713a8d5c99c16ba3fa33
treef6c7b9cdf15953683061c61fc1e0e936aa5927a2
parent143d2600faf1563fd4125686ab84afaab5fb513b
block: better deal with the delayed not supported case in blk_cloned_rq_check_limits

If WRITE_ZERO/WRITE_SAME operation is not supported by the storage,
blk_cloned_rq_check_limits() will return IO error which will cause
device-mapper to fail the paths.

Instead, if the queue limit is set to 0, return BLK_STS_NOTSUPP.
BLK_STS_NOTSUPP will be ignored by device-mapper and will not fail the
paths.

Suggested-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c