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

From: Martin K. Petersen
Date: Mon Nov 24 2025 - 08:01:22 EST



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@xxxxxxxxxx>

--
Martin K. Petersen