Re: [PATCH 2/2] block: avoid unnecessary queue freeze in elevator_set_none()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux