All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the tip tree
@ 2024-10-09  3:45 Stephen Rothwell
  2024-10-09  4:02 ` NeilBrown
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2024-10-09  3:45 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: NeilBrown, Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]

Hi all,

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

In file included from include/linux/fs.h:6,
                 from include/linux/highmem.h:5,
                 from include/linux/bvec.h:10,
                 from include/linux/blk_types.h:10,
                 from include/linux/bio.h:10,
                 from fs/bcachefs/bcachefs.h:188,
                 from fs/bcachefs/fs.c:4:
fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
  281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
      |                               ^
include/linux/wait_bit.h:22:20: note: in definition of macro '__WAIT_BIT_KEY_INITIALIZER'
   22 |         { .flags = word, .bit_nr = bit, }
      |                    ^~~~
fs/bcachefs/fs.c:281:9: note: in expansion of macro 'DEFINE_WAIT_BIT'
  281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
      |         ^~~~~~~~~~~~~~~
fs/bcachefs/fs.c:281:31: note: (near initialization for 'wait.key.flags')
  281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
      |                               ^
include/linux/wait_bit.h:22:20: note: in definition of macro '__WAIT_BIT_KEY_INITIALIZER'
   22 |         { .flags = word, .bit_nr = bit, }
      |                    ^~~~
fs/bcachefs/fs.c:281:9: note: in expansion of macro 'DEFINE_WAIT_BIT'
  281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
      |         ^~~~~~~~~~~~~~~

Caused by commit

  2382d68d7d43 ("sched: change wake_up_bit() and related function to expect unsigned long *")

I have reverted commit

  35f4c66b66c4 ("Merge branch into tip/master: 'sched/core'")

for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the tip tree
  2024-10-09  3:45 linux-next: build failure after merge of the tip tree Stephen Rothwell
@ 2024-10-09  4:02 ` NeilBrown
  2024-10-09  8:10   ` [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry Ingo Molnar
  2024-10-09 20:22   ` linux-next: build failure after merge of the tip tree Kent Overstreet
  0 siblings, 2 replies; 6+ messages in thread
From: NeilBrown @ 2024-10-09  4:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, 09 Oct 2024, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> In file included from include/linux/fs.h:6,
>                  from include/linux/highmem.h:5,
>                  from include/linux/bvec.h:10,
>                  from include/linux/blk_types.h:10,
>                  from include/linux/bio.h:10,
>                  from fs/bcachefs/bcachefs.h:188,
>                  from fs/bcachefs/fs.c:4:
> fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
> fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
>   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);

The fix we want is to replace that line with
   struct wait_bit_queue_entry wait;
I should have checked more carefully - sorry.

I guess we wait for rc3?

Kent: could you please make that change?  The inode_bit_waitqueue() does
initialisation equivalent of DEFINE_WAIT_BIT() so you only need the declaration.

Thanks,
NeilBrown


>       |                               ^
> include/linux/wait_bit.h:22:20: note: in definition of macro '__WAIT_BIT_KEY_INITIALIZER'
>    22 |         { .flags = word, .bit_nr = bit, }
>       |                    ^~~~
> fs/bcachefs/fs.c:281:9: note: in expansion of macro 'DEFINE_WAIT_BIT'
>   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
>       |         ^~~~~~~~~~~~~~~
> fs/bcachefs/fs.c:281:31: note: (near initialization for 'wait.key.flags')
>   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
>       |                               ^
> include/linux/wait_bit.h:22:20: note: in definition of macro '__WAIT_BIT_KEY_INITIALIZER'
>    22 |         { .flags = word, .bit_nr = bit, }
>       |                    ^~~~
> fs/bcachefs/fs.c:281:9: note: in expansion of macro 'DEFINE_WAIT_BIT'
>   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
>       |         ^~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   2382d68d7d43 ("sched: change wake_up_bit() and related function to expect unsigned long *")
> 
> I have reverted commit
> 
>   35f4c66b66c4 ("Merge branch into tip/master: 'sched/core'")
> 
> for today.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 


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

* [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry
  2024-10-09  4:02 ` NeilBrown
@ 2024-10-09  8:10   ` Ingo Molnar
  2024-10-09  8:24     ` NeilBrown
  2024-10-09 20:22   ` linux-next: build failure after merge of the tip tree Kent Overstreet
  1 sibling, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2024-10-09  8:10 UTC (permalink / raw)
  To: NeilBrown
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List


* NeilBrown <neilb@suse.de> wrote:

> On Wed, 09 Oct 2024, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> > 
> > In file included from include/linux/fs.h:6,
> >                  from include/linux/highmem.h:5,
> >                  from include/linux/bvec.h:10,
> >                  from include/linux/blk_types.h:10,
> >                  from include/linux/bio.h:10,
> >                  from fs/bcachefs/bcachefs.h:188,
> >                  from fs/bcachefs/fs.c:4:
> > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
> > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
> >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> 
> The fix we want is to replace that line with
>    struct wait_bit_queue_entry wait;
> I should have checked more carefully - sorry.
> 
> I guess we wait for rc3?
> 
> Kent: could you please make that change?  The inode_bit_waitqueue() does
> initialisation equivalent of DEFINE_WAIT_BIT() so you only need the declaration.

Since the breakage was introduced via tip:sched/core, I've applied the fix 
below.

Does this look good to you?

Thanks,

	Ingo

================>
From: Ingo Molnar <mingo@kernel.org>
Date: Wed, 9 Oct 2024 10:00:09 +0200
Subject: [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry

The following recent commit made DEFINE_WAIT_BIT() type requirements stricter:

  2382d68d7d43 ("sched: change wake_up_bit() and related function to expect unsigned long *")

.. which results in a build failure:

  > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
  > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
  >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);

Since this code relies on the waitqueue initialization within
inode_bit_waitqueue() anyway, the DEFINE_WAIT_BIT() initialization
is unnecessary - we can just declare a waitqueue entry.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 fs/bcachefs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 5bfc26d58270..c410133541ba 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -183,8 +183,9 @@ static void __wait_on_freeing_inode(struct bch_fs *c,
 				    struct bch_inode_info *inode,
 				    subvol_inum inum)
 {
+	struct wait_bit_queue_entry wait;
 	wait_queue_head_t *wq;
-	DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
+
 	wq = inode_bit_waitqueue(&wait, &inode->v, __I_NEW);
 	prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
 	spin_unlock(&inode->v.i_lock);


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

* Re: [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry
  2024-10-09  8:10   ` [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry Ingo Molnar
@ 2024-10-09  8:24     ` NeilBrown
  2024-10-09  8:46       ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2024-10-09  8:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, 09 Oct 2024, Ingo Molnar wrote:
> * NeilBrown <neilb@suse.de> wrote:
> 
> > On Wed, 09 Oct 2024, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > > 
> > > In file included from include/linux/fs.h:6,
> > >                  from include/linux/highmem.h:5,
> > >                  from include/linux/bvec.h:10,
> > >                  from include/linux/blk_types.h:10,
> > >                  from include/linux/bio.h:10,
> > >                  from fs/bcachefs/bcachefs.h:188,
> > >                  from fs/bcachefs/fs.c:4:
> > > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
> > > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
> > >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> > 
> > The fix we want is to replace that line with
> >    struct wait_bit_queue_entry wait;
> > I should have checked more carefully - sorry.
> > 
> > I guess we wait for rc3?
> > 
> > Kent: could you please make that change?  The inode_bit_waitqueue() does
> > initialisation equivalent of DEFINE_WAIT_BIT() so you only need the declaration.
> 
> Since the breakage was introduced via tip:sched/core, I've applied the fix 
> below.
> 
> Does this look good to you?

Perfect, thanks.

NeilBrown

> 
> Thanks,
> 
> 	Ingo
> 
> ================>
> From: Ingo Molnar <mingo@kernel.org>
> Date: Wed, 9 Oct 2024 10:00:09 +0200
> Subject: [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry
> 
> The following recent commit made DEFINE_WAIT_BIT() type requirements stricter:
> 
>   2382d68d7d43 ("sched: change wake_up_bit() and related function to expect unsigned long *")
> 
> .. which results in a build failure:
> 
>   > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
>   > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
>   >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> 
> Since this code relies on the waitqueue initialization within
> inode_bit_waitqueue() anyway, the DEFINE_WAIT_BIT() initialization
> is unnecessary - we can just declare a waitqueue entry.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Suggested-by: NeilBrown <neilb@suse.de>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  fs/bcachefs/fs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
> index 5bfc26d58270..c410133541ba 100644
> --- a/fs/bcachefs/fs.c
> +++ b/fs/bcachefs/fs.c
> @@ -183,8 +183,9 @@ static void __wait_on_freeing_inode(struct bch_fs *c,
>  				    struct bch_inode_info *inode,
>  				    subvol_inum inum)
>  {
> +	struct wait_bit_queue_entry wait;
>  	wait_queue_head_t *wq;
> -	DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> +
>  	wq = inode_bit_waitqueue(&wait, &inode->v, __I_NEW);
>  	prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
>  	spin_unlock(&inode->v.i_lock);
> 
> 


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

* Re: [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry
  2024-10-09  8:24     ` NeilBrown
@ 2024-10-09  8:46       ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2024-10-09  8:46 UTC (permalink / raw)
  To: NeilBrown
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List


* NeilBrown <neilb@suse.de> wrote:

> On Wed, 09 Oct 2024, Ingo Molnar wrote:
> > * NeilBrown <neilb@suse.de> wrote:
> > 
> > > On Wed, 09 Oct 2024, Stephen Rothwell wrote:
> > > > Hi all,
> > > > 
> > > > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > > > failed like this:
> > > > 
> > > > In file included from include/linux/fs.h:6,
> > > >                  from include/linux/highmem.h:5,
> > > >                  from include/linux/bvec.h:10,
> > > >                  from include/linux/blk_types.h:10,
> > > >                  from include/linux/bio.h:10,
> > > >                  from fs/bcachefs/bcachefs.h:188,
> > > >                  from fs/bcachefs/fs.c:4:
> > > > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
> > > > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
> > > >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> > > 
> > > The fix we want is to replace that line with
> > >    struct wait_bit_queue_entry wait;
> > > I should have checked more carefully - sorry.
> > > 
> > > I guess we wait for rc3?
> > > 
> > > Kent: could you please make that change?  The inode_bit_waitqueue() does
> > > initialisation equivalent of DEFINE_WAIT_BIT() so you only need the declaration.
> > 
> > Since the breakage was introduced via tip:sched/core, I've applied the fix 
> > below.
> > 
> > Does this look good to you?
> 
> Perfect, thanks.

You are welcome!

	Ingo

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

* Re: linux-next: build failure after merge of the tip tree
  2024-10-09  4:02 ` NeilBrown
  2024-10-09  8:10   ` [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry Ingo Molnar
@ 2024-10-09 20:22   ` Kent Overstreet
  1 sibling, 0 replies; 6+ messages in thread
From: Kent Overstreet @ 2024-10-09 20:22 UTC (permalink / raw)
  To: NeilBrown
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, Oct 09, 2024 at 03:02:00PM GMT, NeilBrown wrote:
> On Wed, 09 Oct 2024, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> > 
> > In file included from include/linux/fs.h:6,
> >                  from include/linux/highmem.h:5,
> >                  from include/linux/bvec.h:10,
> >                  from include/linux/blk_types.h:10,
> >                  from include/linux/bio.h:10,
> >                  from fs/bcachefs/bcachefs.h:188,
> >                  from fs/bcachefs/fs.c:4:
> > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
> > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
> >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
> 
> The fix we want is to replace that line with
>    struct wait_bit_queue_entry wait;
> I should have checked more carefully - sorry.
> 
> I guess we wait for rc3?
> 
> Kent: could you please make that change?  The inode_bit_waitqueue() does
> initialisation equivalent of DEFINE_WAIT_BIT() so you only need the declaration.

Alright, this is now in my for-next branch:

From 07b246b3b97c96dd81c22849656b0f920fb9c1e8 Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kent.overstreet@linux.dev>
Date: Wed, 9 Oct 2024 16:21:00 -0400
Subject: [PATCH] bcachefs: __wait_for_freeing_inode: Switch to
 wait_bit_queue_entry

inode_bit_waitqueue() is changing - this update clears the way for
sched changes.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 0630bbb87590..2d3e134e847c 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -278,7 +278,8 @@ static void __wait_on_freeing_inode(struct bch_fs *c,
 				    subvol_inum inum)
 {
 	wait_queue_head_t *wq;
-	DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
+	struct wait_bit_queue_entry wait;
+
 	wq = inode_bit_waitqueue(&wait, &inode->v, __I_NEW);
 	prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
 	spin_unlock(&inode->v.i_lock);

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

end of thread, other threads:[~2024-10-09 20:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09  3:45 linux-next: build failure after merge of the tip tree Stephen Rothwell
2024-10-09  4:02 ` NeilBrown
2024-10-09  8:10   ` [PATCH] fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry Ingo Molnar
2024-10-09  8:24     ` NeilBrown
2024-10-09  8:46       ` Ingo Molnar
2024-10-09 20:22   ` linux-next: build failure after merge of the tip tree Kent Overstreet

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.