Re: [PATCH] block: split out a new blk_plug.h helper
Damien Le Moal <[email protected]> Mon, 6 Jul 2026 16:04:48 +0900
| Newsgroups | gmane.linux.kernel.aio.general,gmane.linux.block,gmane.linux.file-systems,gmane.linux.kernel,gmane.linux.kernel.io-uring,gmane.linux.kernel.mm |
|---|---|
| Organization | Western Digital Research |
| Message-ID | <[email protected]> |
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 <[email protected]> A couple of nits below (not entirely sure if they make sense). But otherwise looks OK to me. Reviewed-by: Damien Le Moal <[email protected]> > 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 -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>