Linux Documentation
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-block@vger.kernel.org, linux-doc@vger.kernel.org,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH 1/4] block: add a macro to initialize the status table
Date: Mon, 8 Jun 2026 07:09:10 +0200	[thread overview]
Message-ID: <20260608050910.GB21313@lst.de> (raw)
In-Reply-To: <aiMZ-PXXQ-NxOHT4@casper.infradead.org>

On Fri, Jun 05, 2026 at 07:48:24PM +0100, Matthew Wilcox wrote:
> On Fri, Jun 05, 2026 at 08:44:27PM +0200, Christoph Hellwig wrote:
> > Prepare for adding a new value to the error table by adding a macro
> > to fill it.
> 
> > +#define ENT(_tag, _errno, _desc)	\
> > +[BLK_STS_##_tag] = {				\
> > +	.errno		= _errno,		\
> > +	.name		= _desc,		\
> 
> Bleh.  I hate this.  Before, I can grep for BLK_STS_NOSPC and find it.

You will still find BLK_STS_NOSPC itself in include/linux/blk_types.h

> After, I can't.  Yes, I know we have a lot of such things already, but
> I don't like adding more.

I'm not a huge fan off CPP pasting, and especially thing we should never
use it to define global symbols (hi page/folio flag helpers!), and in
general try to avoid using them as much as possible.  But I think here
the need to keep the names in sync with the tags exposed in debugfs is
more important than the grepability.  Especially as this sits in _the_
core block file, so it can't be easily missed.

  reply	other threads:[~2026-06-08  5:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 18:44 configurable block error injection v2 Christoph Hellwig
2026-06-05 18:44 ` [PATCH 1/4] block: add a macro to initialize the status table Christoph Hellwig
2026-06-05 18:48   ` Matthew Wilcox
2026-06-08  5:09     ` Christoph Hellwig [this message]
2026-06-06  7:14   ` Damien Le Moal
2026-06-06  7:24   ` Hannes Reinecke
2026-06-05 18:44 ` [PATCH 2/4] block: add a "tag" for block status codes Christoph Hellwig
2026-06-06  7:20   ` Damien Le Moal
2026-06-06  7:25   ` Hannes Reinecke
2026-06-05 18:44 ` [PATCH 3/4] block: add a str_to_blk_op helper Christoph Hellwig
2026-06-06  7:20   ` Damien Le Moal
2026-06-06  7:27   ` Hannes Reinecke
2026-06-05 18:44 ` [PATCH 4/4] block: add configurable error injection Christoph Hellwig
2026-06-06  7:28   ` Hannes Reinecke
2026-06-06  7:33   ` Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2026-06-08  5:14 configurable block error injection v3 Christoph Hellwig
2026-06-08  5:14 ` [PATCH 1/4] block: add a macro to initialize the status table Christoph Hellwig
2026-06-08 21:51   ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260608050910.GB21313@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox