Re: [PATCH V2 2/5] dm: ignore discard return value

Martin K. Petersen
2025-11-24T13:00:51Z

Chaitanya,

> __blkdev_issue_discard() always returns 0, making all error checking
> at call sites dead code.
>
> For dm-thin change issue_discard() return type to void, in
> passdown_double_checking_shared_status() remove the r assignment from
> return value of the issue_discard(), for end_discard() hardcod value
> of r to 0 that matches only value returned from
> __blkdev_issue_discard().
>
> md part is simplified to only check !discard_bio by ignoring the
> __blkdev_issue_discard() value.

With md and dm split:

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

--
Martin K. Petersen