[dm-devel] [PATCH v3] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
Ming Lei
ming.lei at redhat.com
Thu Mar 2 01:57:13 UTC 2023
On Tue, Feb 28, 2023 at 05:06:55PM -0700, Uday Shankar wrote:
> The block layer might merge together discard requests up until the
> max_discard_segments limit is hit, but blk_insert_cloned_request checks
> the segment count against max_segments regardless of the req op. This
> can result in errors like the following when discards are issued through
> a DM device and max_discard_segments exceeds max_segments for the queue
> of the chosen underlying device.
>
> blk_insert_cloned_request: over max segments limit. (256 > 129)
>
> Fix this by looking at the req_op and enforcing the appropriate segment
> limit - max_discard_segments for REQ_OP_DISCARDs and max_segments for
> everything else.
>
> Signed-off-by: Uday Shankar <ushankar at purestorage.com>
Reviewed-by: Ming Lei <ming.lei at redhat.com>
Thanks,
Ming
More information about the dm-devel
mailing list