Linux block layer
 help / color / mirror / Atom feed
* [PATCH v3 00/15] block: Catch missing blk-mq debugfs flag array members
@ 2024-07-19 11:28 John Garry
  2024-07-19 11:28 ` [PATCH v3 01/15] block: Add missing entries from cmd_flag_name[] John Garry
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: John Garry @ 2024-07-19 11:28 UTC (permalink / raw)
  To: axboe, hch; +Cc: linux-block, bvanassche, John Garry

Currently we rely on the developer to remember to add the appropriate
entry to a blk-mq debugfs flag array when we add a new member.

This has shown to be error prone.

Add compile-time assertions that we are not missing flag array entries.

A limitation of this approach is that if a non-end-of-array entry was now
later removed from a flag name array, we could not detect that at build
time. But this is unlikely to occur. To actually detect that, we could
make the flag name array entries a flag and name tuple. That would just
add extra complexity and slow the code, which I am not sure if is really
required.

Differences to v2:
- Add Bart's RB tags (thanks)
- Drop redundant enum initializer (Bart)
- Re-order patches to put latent fixes at the front
- Relocate BLK_MQ_CPU_WORK_BATCH and BLK_MQ_MAX_DEPTH
- Put BLK_MQ_S_x in separate enum (Bart)
- Commit message tweaks (Bart)

Christoph Hellwig (1):
  block: remove QUEUE_FLAG_STOPPED

John Garry (14):
  block: Add missing entries from cmd_flag_name[]
  block: Add zone write plugging entry to rqf_name[]
  block: Add missing entry to hctx_flag_name[]
  block: Relocate BLK_MQ_CPU_WORK_BATCH
  block: Relocate BLK_MQ_MAX_DEPTH
  block: Make QUEUE_FLAG_x as an enum
  block: Catch possible entries missing from blk_queue_flag_name[]
  block: Catch possible entries missing from hctx_state_name[]
  block: Catch possible entries missing from hctx_flag_name[]
  block: Catch possible entries missing from alloc_policy_name[]
  block: Catch possible entries missing from cmd_flag_name[]
  block: Use enum to define RQF_x bit indexes
  block: Simplify definition of RQF_NAME()
  block: Catch possible entries missing from rqf_name[]

 block/blk-mq-debugfs.c    |  26 ++++++--
 block/blk-mq.h            |   2 +
 include/linux/blk-mq.h    | 127 +++++++++++++++++++++++---------------
 include/linux/blk_types.h |   1 +
 include/linux/blkdev.h    |  31 +++++-----
 5 files changed, 118 insertions(+), 69 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-07-19 15:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 11:28 [PATCH v3 00/15] block: Catch missing blk-mq debugfs flag array members John Garry
2024-07-19 11:28 ` [PATCH v3 01/15] block: Add missing entries from cmd_flag_name[] John Garry
2024-07-19 11:28 ` [PATCH v3 02/15] block: Add zone write plugging entry to rqf_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 03/15] block: Add missing entry to hctx_flag_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 04/15] block: remove QUEUE_FLAG_STOPPED John Garry
2024-07-19 11:29 ` [PATCH v3 05/15] block: Relocate BLK_MQ_CPU_WORK_BATCH John Garry
2024-07-19 11:29 ` [PATCH v3 06/15] block: Relocate BLK_MQ_MAX_DEPTH John Garry
2024-07-19 11:29 ` [PATCH v3 07/15] block: Make QUEUE_FLAG_x as an enum John Garry
2024-07-19 11:29 ` [PATCH v3 08/15] block: Catch possible entries missing from blk_queue_flag_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 09/15] block: Catch possible entries missing from hctx_state_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 10/15] block: Catch possible entries missing from hctx_flag_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 11/15] block: Catch possible entries missing from alloc_policy_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 12/15] block: Catch possible entries missing from cmd_flag_name[] John Garry
2024-07-19 11:29 ` [PATCH v3 13/15] block: Use enum to define RQF_x bit indexes John Garry
2024-07-19 11:29 ` [PATCH v3 14/15] block: Simplify definition of RQF_NAME() John Garry
2024-07-19 11:29 ` [PATCH v3 15/15] block: Catch possible entries missing from rqf_name[] John Garry
2024-07-19 15:39 ` [PATCH v3 00/15] block: Catch missing blk-mq debugfs flag array members Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox