From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@lst.de>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-aio@kvack.org, linux-kernel@vger.kernel.org,
io-uring@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] block: split out a new blk_plug.h helper
Date: Mon, 6 Jul 2026 16:04:48 +0900 [thread overview]
Message-ID: <f389a101-2af1-4b18-a74b-031e6c1899bd@kernel.org> (raw)
In-Reply-To: <20260706041125.642097-1-hch@lst.de>
On 7/6/26 1:11 PM, Christoph Hellwig wrote:
> blkdev.h gets included in various places outside the block layer just
> for struct blk_plug and related plugging functions.
>
> Split blk_plug into a separate helper to reduce the amount of code
> that needs to get rebuilt when blkdev.h changes and to slightly
> reduce compile times.
>
> In io_uring this requires pulling in a few other headers explicitly that
> previously were implicitly included through blkdev.h.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
A couple of nits below (not entirely sure if they make sense).
But otherwise looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> diff --git a/include/linux/blk_plug.h b/include/linux/blk_plug.h
> new file mode 100644
> index 000000000000..2ac1265662ad
> --- /dev/null
> +++ b/include/linux/blk_plug.h
> @@ -0,0 +1,95 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_BLK_PLUG_H
> +#define _LINUX_BLK_PLUG_H
> +
> +#include <linux/sched.h>
struct blk_plug_cb has a list_head. So maybe also add
#include <linux/types.h>
?
> +
> +struct blk_plug_cb;
Maybe add "struct request;" here too ?
> +typedef void (*blk_plug_cb_fn)(struct blk_plug_cb *cb, bool from_schedule);
> +
> +struct rq_list {
> + struct request *head;
> + struct request *tail;
> +};
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-07-06 7:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 4:11 [PATCH] block: split out a new blk_plug.h helper Christoph Hellwig
2026-07-06 6:38 ` Johannes Thumshirn
2026-07-06 6:45 ` Christoph Hellwig
2026-07-06 6:47 ` Johannes Thumshirn
2026-07-06 7:04 ` Damien Le Moal [this message]
2026-07-06 9:54 ` Christoph Hellwig
2026-07-06 13:09 ` Christian Brauner
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=f389a101-2af1-4b18-a74b-031e6c1899bd@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=linux-aio@kvack.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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