On Thu, May 08, 2025 at 07:03:17AM +0200, Christoph Hellwig wrote: > On Wed, May 07, 2025 at 10:28:24PM +0800, Ming Lei wrote: > > On Wed, May 07, 2025 at 03:53:49PM +0200, Christoph Hellwig wrote: > > > On Wed, May 07, 2025 at 08:04:02PM +0800, Ming Lei wrote: > > > > blk_mq_freeze_queue() can't be called on quiesced queue, otherwise it may > > > > never return if there is any queued requests. > > > > > > > > Fix it by moving queue quiesce int elevator_change() by adding one flag to > > > > 'struct elv_change_ctx' for controlling this behavior. > > > > > > Why do we even need to quiesce the queue here, and not anywhere else? > > > > Quiesce is for draining the in-progress critical area, which can't be > > covered by queue freeze. > > I know. But why do we care about that for removing a scheduler, but > not for changing it? Actually elevator_switch() does quiesce queue, so we can just remove the queue quiesce around elevator_set_none(). Thanks, Ming