Re: [PATCH V2 12/20] block: add `struct elv_change_ctx` for unifying elevator_change

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

 



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





[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