All of lore.kernel.org
 help / color / mirror / Atom feed
* [brauner-github:vfs-7.3.iomap 3/3] fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static?
@ 2026-07-01  6:37 kernel test robot
  2026-07-01 10:34 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-07-01  6:37 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: oe-kbuild-all, Christian Brauner, Christian Brauner

tree:   https://github.com/brauner/linux.git vfs-7.3.iomap
head:   f2727952b21d187deeeb21cd4e84823b6410e650
commit: f2727952b21d187deeeb21cd4e84823b6410e650 [3/3] iomap: add a separate bio_set for iomap_split_ioend
config: m68k-randconfig-r131-20260701 (https://download.01.org/0day-ci/archive/20260701/202607011411.SFoYmRJa-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260701/202607011411.SFoYmRJa-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607011411.SFoYmRJa-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static?

vim +/iomap_ioend_split_bioset +16 fs/iomap/ioend.c

    13	
    14	struct bio_set iomap_ioend_bioset;
    15	EXPORT_SYMBOL_GPL(iomap_ioend_bioset);
  > 16	struct bio_set iomap_ioend_split_bioset;
    17	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [brauner-github:vfs-7.3.iomap 3/3] fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static?
  2026-07-01  6:37 [brauner-github:vfs-7.3.iomap 3/3] fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static? kernel test robot
@ 2026-07-01 10:34 ` Christoph Hellwig
  2026-07-01 10:57   ` Christian Brauner
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2026-07-01 10:34 UTC (permalink / raw)
  To: kernel test robot
  Cc: Christoph Hellwig, oe-kbuild-all, Christian Brauner,
	Christian Brauner

Yes, it should be static, sorry.  Fixed version below:

---
From b52479040dfc5725698ef396960a5a212d5a08ec Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Mon, 29 Jun 2026 14:10:28 +0200
Subject: iomap: add a separate bio_set for iomap_split_ioend

iomap_split_ioend can split bios that already come from
iomap_ioend_bioset and thus deadlock when the bioset is exhausted.

Add a separate bio_set to avoid this deadlock.

Fixes: 5fcbd555d483 ("iomap: split bios to zone append limits in the submission handlers")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/iomap/ioend.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/fs/iomap/ioend.c b/fs/iomap/ioend.c
index f7c3e0c70fd7..82eeeadac6d6 100644
--- a/fs/iomap/ioend.c
+++ b/fs/iomap/ioend.c
@@ -13,6 +13,7 @@
 
 struct bio_set iomap_ioend_bioset;
 EXPORT_SYMBOL_GPL(iomap_ioend_bioset);
+static struct bio_set iomap_ioend_split_bioset;
 
 struct iomap_ioend *iomap_init_ioend(struct inode *inode,
 		struct bio *bio, loff_t file_offset, u16 ioend_flags)
@@ -482,7 +483,8 @@ struct iomap_ioend *iomap_split_ioend(struct iomap_ioend *ioend,
 	sector_offset = ALIGN_DOWN(sector_offset << SECTOR_SHIFT,
 			i_blocksize(ioend->io_inode)) >> SECTOR_SHIFT;
 
-	split = bio_split(bio, sector_offset, GFP_NOFS, &iomap_ioend_bioset);
+	split = bio_split(bio, sector_offset, GFP_NOFS,
+			&iomap_ioend_split_bioset);
 	if (IS_ERR(split))
 		return ERR_CAST(split);
 	split->bi_private = bio->bi_private;
@@ -505,8 +507,23 @@ EXPORT_SYMBOL_GPL(iomap_split_ioend);
 
 static int __init iomap_ioend_init(void)
 {
-	return bioset_init(&iomap_ioend_bioset, 4 * (PAGE_SIZE / SECTOR_SIZE),
+	const unsigned int nr_mempool_entries = 4 * (PAGE_SIZE / SECTOR_SIZE);
+	int error;
+
+	error = bioset_init(&iomap_ioend_bioset, nr_mempool_entries,
 			   offsetof(struct iomap_ioend, io_bio),
 			   BIOSET_NEED_BVECS);
+	if (error)
+		return error;
+	error = bioset_init(&iomap_ioend_split_bioset, nr_mempool_entries,
+			   offsetof(struct iomap_ioend, io_bio),
+			   BIOSET_NEED_BVECS);
+	if (error)
+		goto out_exit_ioend_bioset;
+	return 0;
+
+out_exit_ioend_bioset:
+	bioset_exit(&iomap_ioend_bioset);
+	return error;
 }
 fs_initcall(iomap_ioend_init);
-- 
2.53.0


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

* Re: [brauner-github:vfs-7.3.iomap 3/3] fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static?
  2026-07-01 10:34 ` Christoph Hellwig
@ 2026-07-01 10:57   ` Christian Brauner
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2026-07-01 10:57 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kernel test robot, oe-kbuild-all, Christian Brauner

On Wed, Jul 01, 2026 at 12:34:45PM +0200, Christoph Hellwig wrote:
> Yes, it should be static, sorry.  Fixed version below:

Np, note though that I already fixed this in-tree!

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

end of thread, other threads:[~2026-07-01 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01  6:37 [brauner-github:vfs-7.3.iomap 3/3] fs/iomap/ioend.c:16:16: sparse: sparse: symbol 'iomap_ioend_split_bioset' was not declared. Should it be static? kernel test robot
2026-07-01 10:34 ` Christoph Hellwig
2026-07-01 10:57   ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.