> When virtio_fs_enqueue_req() returns -ENOSPC, completion processing
> can run before the caller adds the request to queued_reqs. If no
> further completions arrive, dispatch is never scheduled and the
> request remains counted in in_flight, hanging queue draining.
>
> Track completion progress under fsvq->lock and sample it when
> submission fails with -ENOSPC. After queueing, schedule dispatch if
> the sequence changed; otherwise completion processing will see the
> queued request and schedule it. Each failed submission keeps its own
> snapshot, so concurrent submitters cannot consume each other's wakeup.
>
> Fixes: 106e4df1206b ("virtio-fs: improved request latencies when Virtio queue
> is full")
> Cc: [email protected] # 6.11+
> Link: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Qihang <[email protected]>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=1