On Thu, May 08, 2025 at 07:04:48AM +0200, Christoph Hellwig wrote: > On Thu, May 08, 2025 at 11:57:09AM +0800, Ming Lei wrote: > > Not sure if I get your point, do you want to avoid freeze queue for the case > > of disk owning the queue? I think it can't be done, because someone may > > still open the bdev and submit IO to it even though del_gendisk() is > > in-progress. > > Isn't the disk marked dead at this point and there should be no > pending I/O submissions? Yeah, just inflight IOs aren't drained. This patch isn't necessary, the only effect is that blk_mq_freeze_queue_wait is done a bit earlier. Thanks, Ming