linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] block: Catch missing debugfs flag array members
@ 2024-07-11  8:23 John Garry
  2024-07-11  8:23 ` [PATCH v2 01/12] block: remove QUEUE_FLAG_STOPPED John Garry
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: John Garry @ 2024-07-11  8:23 UTC (permalink / raw)
  To: axboe, hch; +Cc: linux-block, John Garry

Currently we rely on the developer to add the appropriate entry to the
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.

Christoph Hellwig (1):
  block: remove QUEUE_FLAG_STOPPED

John Garry (11):
  block: Make QUEUE_FLAG_x as an enum
  block: Add build-time assert for size of 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: Add missing entries from cmd_flag_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: Add zone write plugging entry to rqf_name[]
  block: Catch possible entries missing from rqf_name[]

 block/blk-mq-debugfs.c    |  26 +++++++--
 include/linux/blk-mq.h    | 109 +++++++++++++++++++++++++-------------
 include/linux/blk_types.h |   1 +
 include/linux/blkdev.h    |  31 +++++------
 4 files changed, 109 insertions(+), 58 deletions(-)

-- 
2.31.1


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

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

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11  8:23 [PATCH v2 00/12] block: Catch missing debugfs flag array members John Garry
2024-07-11  8:23 ` [PATCH v2 01/12] block: remove QUEUE_FLAG_STOPPED John Garry
2024-07-11  8:23 ` [PATCH v2 02/12] block: Make QUEUE_FLAG_x as an enum John Garry
2024-07-11 18:05   ` Bart Van Assche
2024-07-12 10:33     ` John Garry
2024-07-11  8:23 ` [PATCH v2 03/12] block: Add build-time assert for size of blk_queue_flag_name[] John Garry
2024-07-11  8:23 ` [PATCH v2 04/12] block: Catch possible entries missing from hctx_state_name[] John Garry
2024-07-11 18:08   ` Bart Van Assche
2024-07-15  7:54     ` John Garry
2024-07-15 17:28       ` Bart Van Assche
2024-07-15 17:42         ` John Garry
2024-07-11  8:23 ` [PATCH v2 05/12] block: Catch possible entries missing from hctx_flag_name[] John Garry
2024-07-11 18:10   ` Bart Van Assche
2024-07-15  7:55     ` John Garry
2024-07-11  8:23 ` [PATCH v2 06/12] block: Catch possible entries missing from alloc_policy_name[] John Garry
2024-07-11 18:16   ` Bart Van Assche
2024-07-11  8:23 ` [PATCH v2 07/12] block: Add missing entries from cmd_flag_name[] John Garry
2024-07-11 18:16   ` Bart Van Assche
2024-07-11  8:23 ` [PATCH v2 08/12] block: Catch possible entries missing " John Garry
2024-07-11 18:15   ` Bart Van Assche
2024-07-11  8:23 ` [PATCH v2 09/12] block: Use enum to define RQF_x bit indexes John Garry
2024-07-11 18:13   ` Bart Van Assche
2024-07-15  7:58     ` John Garry
2024-07-11  8:23 ` [PATCH v2 10/12] block: Simplify definition of RQF_NAME() John Garry
2024-07-11 18:14   ` Bart Van Assche
2024-07-11  8:23 ` [PATCH v2 11/12] block: Add zone write plugging entry to rqf_name[] John Garry
2024-07-11 18:14   ` Bart Van Assche
2024-07-11  8:23 ` [PATCH v2 12/12] block: Catch possible entries missing from rqf_name[] John Garry
2024-07-11 18:15   ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).