On Wed, May 07, 2025 at 03:54:50PM +0200, Christoph Hellwig wrote: > On Wed, May 07, 2025 at 08:04:03PM +0800, Ming Lei wrote: > > elevator_set_none() is called when deleting disk, in which queue has been > > un-registered, and elevator switch can't happen any more. > > > > So if q->elevator is NULL, it is not necessary to freeze queue and drain > > IO any more. > > Yes. Also if the disk owns the queue there can't be any more I/O per > definition, so maybe check for that as well? 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. Thanks, Ming