Skip to contentSkip to conversation

linux-next: xfs build failure

PATCH New Stephen Rothwell 2 participants 4 messages Apr 30, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next build (powerpc ppc64_defconfig) fails like this:

fs/xfs/xfs_ialloc.c: In function 'xfs_ialloc_ag_alloc':
fs/xfs/xfs_ialloc.c:301: error: implicit declaration of function 'random32'

I added

#include <linux/random.h>

after the other includes in fs/xfs/xfs_ialloc.c, but there is probably a better fix.

The commit that seems to have caused this 6309a0720469beb77e0ab75f403a98a0aba4140c ("XFS] Don't initialise new inode generation numbers to zero") in the xfs tree that I have seems to have just gone into Linus' tree as commit 359346a9655c8800408ed3ca44517ac7ea95c197.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#1 lore raw
Quoted 11 lines · Stephen Rothwell

Hi all,

Today's linux-next build (powerpc ppc64_defconfig) fails like this:

fs/xfs/xfs_ialloc.c: In function 'xfs_ialloc_ag_alloc':
fs/xfs/xfs_ialloc.c:301: error: implicit declaration of function 'random32'

I added

#include <linux/random.h>

Quoted 8 lines

after the other includes in fs/xfs/xfs_ialloc.c, but there is probably a better fix.

The commit that seems to have caused this 6309a0720469beb77e0ab75f403a98a0aba4140c ("XFS] Don't initialise new inode generation numbers to zero") in the xfs tree that I have seems to have just gone into Linus' tree as commit 359346a9655c8800408ed3ca44517ac7ea95c197.

Ah, I see the problem - a CONFIG_XFS_DEBUG build includes linux/random.h in a debug header file. That's probably why I didn't catch it (I need to check the .config on my build test tree).

I'll get it fixed properly, but in the mean time the include you've got there will suffice...

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#2 lore raw

Hi David,

Quoted 7 lines · On Wed, 30 Apr 2008 16:35:44 +1000 David Chinner <[email protected]> wrote:

Ah, I see the problem - a CONFIG_XFS_DEBUG build includes linux/random.h in a debug header file. That's probably why I didn't catch it (I need to check the .config on my build test tree).

I'll get it fixed properly, but in the mean time the include you've got there will suffice...

Could you make sure something gets sent to Linus pretty quickly as this breaks a lot of the powerpc builds at the moment (see
http://kisskb.ellerman.id.au/kisskb/branch/3/). Or should I do my patch up and sent it?

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#3 lore raw

PATCH 1/1 Fix random.h include for non-debug builds

Quoted 8 lines · Stephen Rothwell

Hi David,

Quoted 5 lines · On Wed, 30 Apr 2008 16:35:44 +1000 David Chinner <[email protected]> wrote:

Ah, I see the problem - a CONFIG_XFS_DEBUG build includes linux/random.h in a debug header file. That's probably why I didn't catch it (I need to check the .config on my build test tree).

Quoted 6 lines
Quoted 2 lines

I'll get it fixed properly, but in the mean time the include you've got there will suffice...

Could you make sure something gets sent to Linus pretty quickly as this breaks a lot of the powerpc builds at the moment (see
http://kisskb.ellerman.id.au/kisskb/branch/3/).

It should break anything that builds a non-debug XFS, not just powerpc.

Quoted 2 lines

Or should I do my patch
up and sent it?

No, the correct patch is below. Linus, can you please apply?

Cheers,

Dave.

---
Include linux/random.h in all builds, not just debug.

---
 fs/xfs/linux-2.6/xfs_linux.h |    1 +
 fs/xfs/support/debug.h       |    2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
fs/xfs/linux-2.6/xfs_linux.h +1 -0
Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_linux.h
===================================================================
@@ -75,6 +75,7 @@
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/spinlock.h>
+#include <linux/random.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
fs/xfs/support/debug.h +0 -2
Index: 2.6.x-xfs-new/fs/xfs/support/debug.h
===================================================================
@@ -49,8 +49,6 @@ extern void assfail(char *expr, char *f,
 
 #else /* DEBUG */
 
-#include <linux/random.h>
-
 #define ASSERT(expr)	\
 	(unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))