Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 4 participants 5 messages Mar 12, 2020 – Mar 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

In file included from fs/erofs/xattr.h:10,
from fs/erofs/inode.c:7:
fs/erofs/inode.c: In function 'erofs_read_inode':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~

In file included from fs/erofs/data.c:7:
fs/erofs/data.c: In function 'erofs_read_raw_page':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/data.c: In function 'erofs_bmap':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:351:16: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  351 |   if (block >> LOG_SECTORS_PER_BLOCK >= blks)
      |                ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

61c7d3d5e015 ("block: refactor duplicated macros")

I have used the block tree from next-20200311 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 45 lines · Stephen Rothwell

Hi all,

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

In file included from fs/erofs/xattr.h:10,
from fs/erofs/inode.c:7:
fs/erofs/inode.c: In function 'erofs_read_inode':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~

In file included from fs/erofs/data.c:7:
fs/erofs/data.c: In function 'erofs_read_raw_page':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/data.c: In function 'erofs_bmap':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:351:16: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  351 |   if (block >> LOG_SECTORS_PER_BLOCK >= blks)
      |                ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

Quoted 7 lines

61c7d3d5e015 ("block: refactor duplicated macros")

I have used the block tree from next-20200311 for today.

--
Cheers,
Stephen Rothwell

Hi,

I was building a kernel without erofs. Just including include/linux/blkdev.h will fix it, should I amend the patch or send a fix?

Cheers,

--
Matteo Croce
per aspera ad upstream

#2 lore raw
Quoted 54 lines · Matteo Croce
Quoted 45 lines · Stephen Rothwell

Hi all,

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

In file included from fs/erofs/xattr.h:10,
from fs/erofs/inode.c:7:
fs/erofs/inode.c: In function 'erofs_read_inode':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~

In file included from fs/erofs/data.c:7:
fs/erofs/data.c: In function 'erofs_read_raw_page':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/data.c: In function 'erofs_bmap':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:351:16: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  351 |   if (block >> LOG_SECTORS_PER_BLOCK >= blks)
      |                ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

Quoted 7 lines

61c7d3d5e015 ("block: refactor duplicated macros")

I have used the block tree from next-20200311 for today.

--
Cheers,
Stephen Rothwell

Quoted 5 lines

Hi,

I was building a kernel without erofs. Just including include/linux/blkdev.h will fix it, should I amend the patch or send a fix?

I'll drop the patch. I was worried about the patch to begin with, something like this really should be done through cocinelle so there's less concern of a stupid mistake.

On top of that, somewhat miffed that you'd have a v3 of a patch, yet haven't bothered to even _compile_ the parts you touch. That's inexcusable.

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 66 lines · Jens Axboe
Quoted 54 lines · Matteo Croce
Quoted 45 lines · Stephen Rothwell

Hi all,

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

In file included from fs/erofs/xattr.h:10,
from fs/erofs/inode.c:7:
fs/erofs/inode.c: In function 'erofs_read_inode':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/inode.c:122:30: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  122 |   inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
      |                              ^~~~~~~~~~~~~~~~~~~~~

In file included from fs/erofs/data.c:7:
fs/erofs/data.c: In function 'erofs_read_raw_page':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT

      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/internal.h:197:31: note: each undeclared identifier is reported only once for each function it appears in
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:226:4: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  226 |    LOG_SECTORS_PER_BLOCK;
      |    ^~~~~~~~~~~~~~~~~~~~~
fs/erofs/data.c: In function 'erofs_bmap':
fs/erofs/internal.h:197:31: error: 'PAGE_SECTORS_SHIFT' undeclared (first use in this function); did you mean 'PA_SECTION_SHIFT'?
  197 | #define LOG_SECTORS_PER_BLOCK PAGE_SECTORS_SHIFT
      |                               ^~~~~~~~~~~~~~~~~~
fs/erofs/data.c:351:16: note: in expansion of macro 'LOG_SECTORS_PER_BLOCK'
  351 |   if (block >> LOG_SECTORS_PER_BLOCK >= blks)
      |                ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

Quoted 7 lines

61c7d3d5e015 ("block: refactor duplicated macros")

I have used the block tree from next-20200311 for today.

--
Cheers,
Stephen Rothwell

Quoted 5 lines

Hi,

I was building a kernel without erofs. Just including include/linux/blkdev.h will fix it, should I amend the patch or send a fix?

I'll drop the patch. I was worried about the patch to begin with, something like this really should be done through cocinelle so there's less concern of a stupid mistake.

Quoted 7 lines

On top of that, somewhat miffed that you'd have a v3 of a patch, yet haven't bothered to even _compile_ the parts you touch. That's inexcusable.

--
Jens Axboe

I apologize, I was using a config with all in it but erofs, which was moved from staging in 5.4:

$ grep -e BRD -e ZRAM -e DAX -e MD_RAID -e SDHCI= -e EXT2 -e SWAP -e
DM_RAID -e EROFS .config
CONFIG_SWAP=y
# CONFIG_MEMCG_SWAP is not set
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_WANTS_THP_SWAP=y
CONFIG_THP_SWAP=y
# CONFIG_FRONTSWAP is not set
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
CONFIG_DM_RAID=y
CONFIG_MMC_SDHCI=y
CONFIG_DAX=y
CONFIG_DEV_DAX=y
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_FS_DAX is not set
# CONFIG_EROFS_FS is not set

I'm running coccinelle with this change appended, and also an all allyesconfig

fs/erofs/internal.h +1 -0
@@ -16,6 +16,7 @@
 #include <linux/magic.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/blkdev.h>
 #include "erofs_fs.h"
 

Regards,

Signature · 2 lines
Matteo Croce
per aspera ad upstream
Acked-by
#4 lore raw

Hi Matteo,

On Thu, Mar 12, 2020 at 02:57:14PM +0100, Matteo Croce wrote:

[]

Quoted 2 lines

I'm running coccinelle with this change appended, and also an all allyesconfig

I just notice this topic as a part of regular mailing list reading...

I didn't see this change before, but it seems that's a trivial patch at least from EROFS part.

And maybe yes, testing allyesconfig (or allmodconfig) in advance is better just for the sake of dependency safety...

For the new following part, feel free to add my

if it's of some use (If it's useless, please ignore the above words.)

Thanks,
Gao Xiang

Quoted 15 lines
fs/erofs/internal.h +1 -0
@@ -16,6 +16,7 @@
 #include <linux/magic.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/blkdev.h>
 #include "erofs_fs.h"
 
 Regards,
Signature · 2 lines
Matteo Croce
per aspera ad upstream