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

Stephen Rothwell posted 1 patch 3 years, 9 months ago
There is a newer version of this series
drivers/block/ublk_drv.c | 1 -
1 file changed, 1 deletion(-)
linux-next: build failure after merge of the block tree
Posted by Stephen Rothwell 3 years, 9 months ago
Hi all,

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

drivers/block/ublk_drv.c:951:19: error: 'no_llseek' undeclared here (not in a function); did you mean 'noop_llseek'?
  951 |         .llseek = no_llseek,
      |                   ^~~~~~~~~
      |                   noop_llseek

Caused by commit

  71f28f3136af ("ublk_drv: add io_uring based userspace block driver")

interacting with commit

  8804bffa93a1 ("fs: remove no_llseek")

from the vfs tree.

I have applied the following merge resolution patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2022 13:59:09 +1000
Subject: [PATCH] fix up for "fs: remove no_llseek"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/block/ublk_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index f10c4319dc1f..52fd0af8a4f2 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -948,7 +948,6 @@ static const struct file_operations ublk_ch_fops = {
 	.owner = THIS_MODULE,
 	.open = ublk_ch_open,
 	.release = ublk_ch_release,
-	.llseek = no_llseek,
 	.uring_cmd = ublk_ch_uring_cmd,
 	.mmap = ublk_ch_mmap,
 };
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the block tree
Posted by Al Viro 3 years, 9 months ago
On Fri, Jul 15, 2022 at 02:02:59PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the block tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/block/ublk_drv.c:951:19: error: 'no_llseek' undeclared here (not in a function); did you mean 'noop_llseek'?
>   951 |         .llseek = no_llseek,
>       |                   ^~~~~~~~~
>       |                   noop_llseek
> 
> Caused by commit
> 
>   71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
> 
> interacting with commit
> 
>   8804bffa93a1 ("fs: remove no_llseek")
> 
> from the vfs tree.

I suspect that it would be a good idea to slap
#define no_llseek NULL
into include/linux/fs.h for the merge window, then remove it (and all
stray no_llseek initializers) at -rc1.  Linus, would you be OK with
that approach?
Re: linux-next: build failure after merge of the block tree
Posted by Jens Axboe 3 years, 9 months ago
On 7/14/22 10:10 PM, Al Viro wrote:
> On Fri, Jul 15, 2022 at 02:02:59PM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the block tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> drivers/block/ublk_drv.c:951:19: error: 'no_llseek' undeclared here (not in a function); did you mean 'noop_llseek'?
>>   951 |         .llseek = no_llseek,
>>       |                   ^~~~~~~~~
>>       |                   noop_llseek
>>
>> Caused by commit
>>
>>   71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
>>
>> interacting with commit
>>
>>   8804bffa93a1 ("fs: remove no_llseek")
>>
>> from the vfs tree.
> 
> I suspect that it would be a good idea to slap
> #define no_llseek NULL
> into include/linux/fs.h for the merge window, then remove it (and all
> stray no_llseek initializers) at -rc1.  Linus, would you be OK with
> that approach?

Not Linus, but I think that's a good idea as it'll reduce the pain for
any new users added in other trees.

-- 
Jens Axboe
Re: linux-next: build failure after merge of the block tree
Posted by Linus Torvalds 3 years, 9 months ago
On Fri, Jul 15, 2022 at 7:43 AM Jens Axboe <axboe@kernel.dk> wrote:
>
> On 7/14/22 10:10 PM, Al Viro wrote:
> >
> > I suspect that it would be a good idea to slap
> > #define no_llseek NULL
> > into include/linux/fs.h for the merge window, then remove it (and all
> > stray no_llseek initializers) at -rc1.  Linus, would you be OK with
> > that approach?
>
> Not Linus, but I think that's a good idea as it'll reduce the pain for
> any new users added in other trees.

Yeah, sounds fine to me too.

                   Linus
Re: linux-next: build failure after merge of the block tree
Posted by Al Viro 3 years, 9 months ago
On Fri, Jul 15, 2022 at 10:33:30AM -0700, Linus Torvalds wrote:
> On Fri, Jul 15, 2022 at 7:43 AM Jens Axboe <axboe@kernel.dk> wrote:
> >
> > On 7/14/22 10:10 PM, Al Viro wrote:
> > >
> > > I suspect that it would be a good idea to slap
> > > #define no_llseek NULL
> > > into include/linux/fs.h for the merge window, then remove it (and all
> > > stray no_llseek initializers) at -rc1.  Linus, would you be OK with
> > > that approach?
> >
> > Not Linus, but I think that's a good idea as it'll reduce the pain for
> > any new users added in other trees.
> 
> Yeah, sounds fine to me too.

OK, branch rearranged (#work.lseek-2 now), along with #for-next.

After that we have no_llseek defined to NULL and all its instances
consisting of
1) that define
2) a bunch of initializers of .llseek
3) one mentioning in Documentation/filesystems/porting.rst

So if you could run

git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\<no_llseek\>/d' $i
done

just before -rc1, it would deal with the problem with minimal
conflicts during the merge window.

FWIW, right now diffstat of that branch is
 Documentation/filesystems/porting.rst |  8 ++++++++
 drivers/dma-buf/dma-buf.c             |  1 -
 drivers/gpu/drm/drm_file.c            |  3 +--
 drivers/vfio/vfio.c                   |  2 +-
 fs/coredump.c                         |  4 ++--
 fs/file_table.c                       |  2 ++
 fs/open.c                             |  2 ++
 fs/overlayfs/copy_up.c                |  3 +--
 fs/read_write.c                       | 17 +++--------------
 fs/splice.c                           | 10 ++++------
 include/linux/fs.h                    |  2 +-
 kernel/bpf/bpf_iter.c                 |  3 +--
 12 files changed, 26 insertions(+), 31 deletions(-)

without any changes in file_operations initializers.  With 270-odd
more lines removed by the loop above...