On Fri, Jul 24, 2020 at 09:33:22AM -0700, Ritika Srivastava wrote: > If WRITE_ZERO/WRITE_SAME operation is not supported by the storage, > blk_cloned_rq_check_limits() will return -EIO 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. How do we end up calling blk_cloned_rq_check_limits when the operations aren't actually supported? The upper layers should make sure this never happens, so you're just fixing symptoms here and not the root cause.