yet another approach to fix the loop lock order inversions v5
- To: Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>, Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>
- Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>, Jan Kara <jack@suse.cz>, "Darrick J . Wong" <djwong@kernel.org>, Ming Lei <ming.lei@redhat.com>, Matteo Croce <mcroce@microsoft.com>, linux-block@vger.kernel.org, nbd@other.debian.org
- Subject: yet another approach to fix the loop lock order inversions v5
- From: Christoph Hellwig <hch@lst.de>
- Date: Fri, 25 Mar 2022 07:39:15 +0100
- Message-id: <[🔎] 20220325063929.1773899-1-hch@lst.de>
Hi all,
this series uses the approach from Tetsuo to delay the destroy_workueue
call, extended by a delayed teardown of the workers to fix a potential
race window then the workqueue can be still round after finishing the
commands.
Changes since v4:
- keep the (questionable) __invalidate_device call in nbd as-is for now
- suppress uevents while reconfiguring
Changes since v3:
- change bd_openers into a atomic_t, including a bunch of cleanups
and fix found while adding those
Changes since v2:
- rebased to the lastest block for-next tree, which has the async
clear reverted and ->free_disk
- impkement ->free_disk for loop to handle open vs delete races
more gracefully
- get rid of lo_refcnt entirely
Changes since v1:
- add comments to document the lo_refcnt synchronization
- fix comment typos
Reply to: