Re: [PATCH] nvme: fix handling single range discard request

Chaitanya Kulkarni
2023-03-08T05:39:07Z

On 3/3/2023 3:13 PM, Ming Lei wrote:
> When investigating one customer report on warning in nvme_setup_discard,
> we observed the controller(nvme/tcp) actually exposes
> queue_max_discard_segments(req->q) == 1.
>
> Obviously the current code can't handle this situation, since contiguity
> merge like normal RW request is taken.
>
> Fix the issue by building range from request sector/nr_sectors directly.
>
> Fixes: b35ba01ea697 ("nvme: support ranged discard requests")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck