Re: [PATCH] block: Use enum for blk-mq tagset flags

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

 



On 23/12/2024 19:27, Christoph Hellwig wrote:
On Mon, Dec 23, 2024 at 10:41:53AM +0000, John Garry wrote:
Use an enum for tagset flags, so that they don't need to be manually
renumbered when modified.

They don't need to be renumbered.

Sure, they don't need to be. But using an auto-numbered enum makes easy to catch when we add a flag but don't update the respective debugfs flag name structure.

Sparse bitfields work just fine
and are a lot simpler and cleaner than the indirection added here.


I don't think that having unused gaps in the bitfields is so neat.

FWIW, this patch could be further improved to remove the ilog2 usage in HCTX_FLAG_NAME, which is the only remaining debugfs macro to use this.




[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