Skip to contentSkip to conversation

linux-next: build failure after merge of the block tree

PATCH Mark Brown 3 participants 3 messages Aug 3 – Aug 13

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (arm64 allnoconfig) failed like this:

/tmp/next/build/fs/iomap/direct-io.c: In function '__iomap_dio_read_simple':
/tmp/next/build/fs/iomap/direct-io.c:1037:15: error: too few arguments to function 'bio_iov_iter_get_pages'

 1037 |         ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
      |               ^~~~~~~~~~~~~~~~~~~~~~

In file included from /tmp/next/build/include/linux/bio-integrity.h:5,
from /tmp/next/build/fs/iomap/direct-io.c:6:
/tmp/next/build/include/linux/bio.h:524:5: note: declared here
524 | int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,

      |     ^~~~~~~~~~~~~~~~~~~~~~

caused by a sematic conflict between

14b007e178811 (block: validate user space vectors during extraction)

from the block tree and

36f199c8d0ee4 (iomap: add simple dio path for small direct I/O)

from the vfs-brauner tree. I have applied the fixup patch below and can carry as needed, you should ensure you flag this to Linus when sending PRs:

From 5bf17d9828d05688ad4fd04cc07b64642d4ba295 Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Mon, 3 Aug 2026 15:53:13 +0100
Subject: [PATCH] fs: Fix up semantic conflict with bio_iov_iter_get_pages

/tmp/next/build/fs/iomap/direct-io.c: In function '__iomap_dio_read_simple':
/tmp/next/build/fs/iomap/direct-io.c:1037:15: error: too few arguments to function 'bio_iov_iter_get_pages'

 1037 |         ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
      |               ^~~~~~~~~~~~~~~~~~~~~~

In file included from /tmp/next/build/include/linux/bio-integrity.h:5,
from /tmp/next/build/fs/iomap/direct-io.c:6:
/tmp/next/build/include/linux/bio.h:524:5: note: declared here
524 | int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,

      |     ^~~~~~~~~~~~~~~~~~~~~~
---
 fs/iomap/direct-io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/iomap/direct-io.c +2 -1
index 2b3e916dedc77..2aa71be36c996 100644
@@ -1034,7 +1034,8 @@ ssize_t __iomap_dio_read_simple(struct kiocb *iocb, struct iov_iter *iter,
 	bio->bi_iter.bi_sector = iomap_sector(&iomi->iomap, iomi->pos);
 	bio->bi_ioprio = iocb->ki_ioprio;
 
-	ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
+	ret = bio_iov_iter_get_pages(bio, iter, bdev_dma_alignment(bio->bi_bdev),
+				     alignment - 1);
 	if (unlikely(ret))
 		goto out_bio_put;
 
Signature · 1 line
2.47.3
#1 lore raw
Quoted 52 lines · Mark Brown

Hi all,

After merging the block tree, today's linux-next build (arm64 allnoconfig) failed like this:

/tmp/next/build/fs/iomap/direct-io.c: In function '__iomap_dio_read_simple':
/tmp/next/build/fs/iomap/direct-io.c:1037:15: error: too few arguments to function 'bio_iov_iter_get_pages'

 1037 |         ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
      |               ^~~~~~~~~~~~~~~~~~~~~~

In file included from /tmp/next/build/include/linux/bio-integrity.h:5,
from /tmp/next/build/fs/iomap/direct-io.c:6:
/tmp/next/build/include/linux/bio.h:524:5: note: declared here
524 | int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,

      |     ^~~~~~~~~~~~~~~~~~~~~~

caused by a sematic conflict between

14b007e178811 (block: validate user space vectors during extraction)

from the block tree and

36f199c8d0ee4 (iomap: add simple dio path for small direct I/O)

from the vfs-brauner tree. I have applied the fixup patch below and can carry as needed, you should ensure you flag this to Linus when sending PRs:

From 5bf17d9828d05688ad4fd04cc07b64642d4ba295 Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Mon, 3 Aug 2026 15:53:13 +0100
Subject: [PATCH] fs: Fix up semantic conflict with bio_iov_iter_get_pages

/tmp/next/build/fs/iomap/direct-io.c: In function '__iomap_dio_read_simple':
/tmp/next/build/fs/iomap/direct-io.c:1037:15: error: too few arguments to function 'bio_iov_iter_get_pages'

 1037 |         ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
      |               ^~~~~~~~~~~~~~~~~~~~~~

In file included from /tmp/next/build/include/linux/bio-integrity.h:5,
from /tmp/next/build/fs/iomap/direct-io.c:6:
/tmp/next/build/include/linux/bio.h:524:5: note: declared here
524 | int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,

      |     ^~~~~~~~~~~~~~~~~~~~~~
---
 fs/iomap/direct-io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/iomap/direct-io.c +0 -0
index 2b3e916dedc77..2aa71be36c996 100644

fs/iomap/direct-io.c ssize_t __iomap_dio_read_simple(struct kiocb *iocb, struct iov_iter *iter, · line 1040

Quoted 8 lines
fs/iomap/direct-io.c +2 -1
@@ -1034,7 +1034,8 @@ ssize_t __iomap_dio_read_simple(struct kiocb *iocb, struct iov_iter *iter,
 	bio->bi_iter.bi_sector = iomap_sector(&iomi->iomap, iomi->pos);
 	bio->bi_ioprio = iocb->ki_ioprio;
 
-	ret = bio_iov_iter_get_pages(bio, iter, alignment - 1);
+	ret = bio_iov_iter_get_pages(bio, iter, bdev_dma_alignment(bio->bi_bdev),
+				     alignment - 1);
 	if (unlikely(ret))
 		goto out_bio_put;

Looks good to me, thanks Mark.

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to Mark Brown
kernel test robot noticed the following build errors:

Hi Mark,

kernel test robot noticed the following build errors:

[auto build test ERROR on brauner-vfs/vfs.all]
[cannot apply to linus/master v7.2-rc7 next-20260812]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mark-Brown/linux-next-build-failure-after-merge-of-the-block-tree/20260813-203616
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/anDHU9Wc-EGV1KYL%40sirena.org.uk
patch subject: linux-next: build failure after merge of the block tree
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260814/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260814/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

fs/iomap/direct-io.c: In function '__iomap_dio_read_simple':

>> fs/iomap/direct-io.c:1036:15: error: too many arguments to function 'bio_iov_iter_get_pages'; expected 3, have 4
    1036 |         ret = bio_iov_iter_get_pages(bio, iter, bdev_dma_alignment(bio->bi_bdev),
         |               ^~~~~~~~~~~~~~~~~~~~~~
    1037 |                                      alignment - 1);
         |                                      ~~~~~~~~~~~~~

In file included from include/linux/bio-integrity.h:5,
from fs/iomap/direct-io.c:6:
include/linux/bio.h:479:5: note: declared here
479 | int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,
| ^~~~~~~~~~~~~~~~~~~~~~

vim +/bio_iov_iter_get_pages +1036 fs/iomap/direct-io.c

990
991 ssize_t __iomap_dio_read_simple(struct kiocb *iocb, struct iov_iter *iter,
992 struct iomap_iter *iomi)
993 {
994 gfp_t gfp = (iomi->flags & IOMAP_NOWAIT) ? GFP_NOWAIT : GFP_KERNEL;
995 struct iomap_dio_simple *sr;
996 unsigned int alignment;
997 struct bio *bio;
998 ssize_t ret;
999
1000 if (iomi->iomap.type != IOMAP_MAPPED ||
1001 iomi->iomap.offset + iomi->iomap.length < iomi->pos + iomi->len ||
1002 (iomi->iomap.flags & IOMAP_F_INTEGRITY)) {
1003 ret = -ENOTBLK;
1004 goto out_dio_end;
1005 }
1006
1007 alignment = iomap_dio_alignment(iomi->inode, iomi->iomap.bdev, 0);
1008 if ((iomi->pos | iomi->len) & (alignment - 1)) {
1009 ret = -EINVAL;
1010 goto out_dio_end;
1011 }
1012
1013 if (unlikely(!iomi->inode->i_sb->s_dio_done_wq &&
1014 !is_sync_kiocb(iocb))) {
1015 ret = sb_init_dio_done_wq(iomi->inode->i_sb);
1016 if (ret < 0)
1017 goto out_dio_end;
1018 }
1019
1020 trace_iomap_dio_rw_begin(iocb, iter, 0, 0);
1021
1022 bio = bio_alloc_bioset(iomi->iomap.bdev,
1023 bio_iov_vecs_to_alloc(iter, BIO_MAX_VECS),
1024 REQ_OP_READ, gfp, &iomap_dio_simple_pool);
1025 if (!bio) {
1026 ret = -EAGAIN;
1027 goto out_dio_end;
1028 }
1029 sr = container_of(bio, struct iomap_dio_simple, bio);
1030 sr->iocb = iocb;
1031 sr->dio_flags = 0;
1032
1033 bio->bi_iter.bi_sector = iomap_sector(&iomi->iomap, iomi->pos);
1034 bio->bi_ioprio = iocb->ki_ioprio;
1035

> 1036		ret = bio_iov_iter_get_pages(bio, iter, bdev_dma_alignment(bio->bi_bdev),

1037 alignment - 1);
1038 if (unlikely(ret))
1039 goto out_bio_put;
1040
1041 if (bio->bi_iter.bi_size != iomi->len) {
1042 iov_iter_revert(iter, bio->bi_iter.bi_size);
1043 ret = -ENOTBLK;
1044 goto out_bio_release_pages;
1045 }
1046
1047 sr->size = bio->bi_iter.bi_size;
1048 if (user_backed_iter(iter)) {
1049 bio_set_pages_dirty(bio);
1050 sr->dio_flags |= IOMAP_DIO_USER_BACKED;
1051 }
1052
1053 if (iocb->ki_flags & IOCB_NOWAIT)
1054 bio->bi_opf |= REQ_NOWAIT;
1055
1056 if (is_sync_kiocb(iocb)) {
1057 submit_bio_wait(bio);
1058 return iomap_dio_simple_complete(sr);
1059 }
1060
1061 if ((iocb->ki_flags & IOCB_HIPRI)) {
1062 bio->bi_opf |= REQ_POLLED;
1063 WRITE_ONCE(iocb->private, bio);
1064 }
1065 bio->bi_end_io = iomap_dio_simple_end_io;
1066 submit_bio(bio);
1067 trace_iomap_dio_rw_queued(iomi->inode, iocb->ki_pos, iomi->len);
1068 return -EIOCBQUEUED;
1069
1070 out_bio_release_pages:
1071 bio_release_pages(bio, false);
1072 out_bio_put:
1073 bio_put(bio);
1074 out_dio_end:
1075 inode_dio_end(iomi->inode);
1076 return ret;
1077 }
1078 EXPORT_SYMBOL_GPL(__iomap_dio_read_simple);
1079

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