Commit d8ce7432 authored by Ritika Srivastava's avatar Ritika Srivastava Committed by Yang Yingliang
Browse files

block: better deal with the delayed not supported case in blk_cloned_rq_check_limits



mainline inclusion
from mainline-v5.10
commit 8327cce5
category: bugfix
bugzilla: 46895
CVE: NA
---------------------------

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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarRitika Srivastava <ritika.srivastava@oracle.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>

Conflicts:
	block/blk-core.c

Signed-off-by: default avataryangerkun <yangerkun@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 264ce4e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment