On Tue, Oct 08, 2024 at 03:10:53PM +0900, Sergey Senozhatsky wrote: > cd->lock still falls a victim of > "blk_queue_enter() and blk_queue_start_drain() are both called under ->open_mutex" > thingy, which seems like a primary problem here. No matter why > blk_queue_enter() sleeps, draining under ->open_mutex, given that what we > want to drain can hold ->open_mutex, sometimes isn't going to drain. Yes. So I think we'll need to move __blk_mark_disk_dead out of ->open_mutex again, it also isn't protected when calling blk_mark_disk_dead, but we'll also need to stop the SCSI LLDs from submitting new commands from their ->relase routines. Let me cook up a little series..