Re: [PATCH V3 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 Fri, Apr 25, 2025 at 08:23:41PM +0200, Christoph Hellwig wrote:
> On Thu, Apr 24, 2025 at 11:21:35PM +0800, Ming Lei wrote:
> > +struct elv_change_ctx {
> > +	const char *name;
> > +	bool uevent;
> 
> There's only one caller that wants to supress the uevents.  So maybe
> invert the polarity so that it only has to be set in one place,
> which also documents how setting the initial scheduler is special a
> bit better.

OK.

> 
> > -	ret = elv_register_queue(q, true);
> > +	ret = elv_register_queue(q, ctx->uevent);
> 
> .. and pass the ctx on to elv_register_queue instead of converting
> paramter types.  Although that might be woeth doing later when
> another argument derived from ctx gets passed as well.

ctx isn't very useful for elv_register_queue(), which can't figure out
the exact elevator queue to use from `ctx` since there are two(old, new).


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