Re: [PATCH v9] loop: defer the queue limits clear to a workqueue

From: Bart Van Assche

Date: Wed Dec 02 2026 - 10:14:03 EST


On 12/1/26 5:14 AM, Tao Cui wrote:
Done: the work item is now queued on a dedicated unbounded workqueue
(loopc%d) instead of lo->workqueue, and lo_free_disk() drains that
workqueue before the loop_device is freed, so outstanding clear work
items cannot outlive it.

On the deadlock concern: I could not trigger it on either queue
placement, despite trying fairly hard with an adversarial mix of
LOOP_SET_BLOCK_SIZE, LOOP_SET_DIRECT_IO, write-zeroes and rebind churn
(600 rebinds, 10,000 queue-limits updates, up to 56 concurrent failing
requests, stacked loop devices) under PROVE_LOCKING. The backing
files in these tests are memory-backed, so the drain times are short.
The failure reporting stays at exactly one per binding throughout, and
no report, hang or deadlock was observed with either the shared or the
dedicated workqueue.

The full suite (loop/011, the concurrency sweep and the mkfs/unbind
stress) also runs clean on both kernels.
Has v10 of this patch already been posted?

Thanks,

Bart.