Re: [PATCH v2 04/12] block: Catch possible entries missing from hctx_state_name[]

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

 



On 11/07/2024 19:08, Bart Van Assche wrote:
On 7/11/24 1:23 AM, John Garry wrote:
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 89ba6b16fe8b..225e51698470 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -664,12 +664,14 @@ enum {
      BLK_MQ_F_ALLOC_POLICY_START_BIT = 8,
      BLK_MQ_F_ALLOC_POLICY_BITS = 1,
+    /* Keep hctx_state_name[] in sync with the definitions below */
      BLK_MQ_S_STOPPED    = 0,
      BLK_MQ_S_TAG_ACTIVE    = 1,
      BLK_MQ_S_SCHED_RESTART    = 2,
      /* hw queue is inactive after all its CPUs become offline */
      BLK_MQ_S_INACTIVE    = 3,
+    BLK_MQ_S_MAX,

Please create a new "enum {" section for the BLK_MQ_S_ constants.
That will make it more clear that these are unrelated to the other
constants defined above and below the BLK_MQ_S_ constants.

ok, fine.

If we are going to start breaking up this misc enum, then where do BLK_MQ_MAX_DEPTH and BLK_MQ_CPU_WORK_BATCH really belong? I'd be more inclined to have a separate #define for each of them. I am not sure how they ever ended up in this same enum.

BTW, BLK_MQ_CPU_WORK_BATCH is only used in block/blk-mq.c, so I don't see why it is even in a public API.







[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