On Tue, Apr 22, 2025 at 09:07:39AM +0200, Christoph Hellwig wrote: > On Sat, Apr 19, 2025 at 12:36:53AM +0800, Ming Lei wrote: > > Add `struct elv_change_ctx` and prepare for unifying elevator_change(), > > with this way, any input & output parameter can be provided & observed > > in top caller. > > > > This way also helps to move kobject & debugfs things out of > > ->elevator_lock & freezing queue. > > As pointed out last time, please move the entire loop body that > calls __elevator_change from __blk_mq_update_nr_hw_queues into a > helper inside of elevator.c, which means that this structure can > be kept private there. Please see the following patch of 'block: move elv_register[unregister]_queue out of elevator_lock' in which elevator_change_done() has to be added, then the context structure can't be kept as private any more. > > Also please use a flags value with named flags instead of the various > booleans. 'struct elv_change_ctx' has to be parameter, so it doesn't matter to use flags value any more, and 'bool' should be easier. Thanks, Ming