tree:
https://github.com/kdave/btrfs-devel.git dev/auth-hash
head: 212f7564065bdfda0a55ab1ef52a4868572359de
commit: 13be51617b056261da9212d109c77311a895bb6f [158/162] btrfs: add authentication
support
config: powerpc64-randconfig-r032-20210215 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://github.com/kdave/btrfs-devel/commit/13be51617b056261da9212d109c77...
git remote add kdave-btrfs-devel
https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel dev/auth-hash
git checkout 13be51617b056261da9212d109c77311a895bb6f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:115:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:117:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:119:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:121:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:123:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
> fs/btrfs/super.c:608:8: warning: shift count >= width of type
[-Wshift-count-overflow]
if (btrfs_test_opt(info,
AUTH_KEY)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:628:8: warning: shift count >= width of type
[-Wshift-count-overflow]
if (btrfs_test_opt(info, AUTH_KEY)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:88:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:1127:3: warning: shift count >= width of type
[-Wshift-count-overflow]
btrfs_set_opt(info->mount_opt, AUTH_KEY);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1393:40: note: expanded from macro 'btrfs_set_opt'
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:69:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:1574:6: warning: shift count >= width of type
[-Wshift-count-overflow]
if (btrfs_test_opt(info, AUTH_KEY))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
16 warnings generated.
--
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:85:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:87:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:89:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:91:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:93:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
> fs/btrfs/disk-io.c:2321:7: warning: shift count >= width of
type [-Wshift-count-overflow]
if (!btrfs_test_opt(fs_info, AUTH_KEY))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
13 warnings generated.
--
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:27:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:29:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:31:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:33:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:35:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
> fs/btrfs/ioctl.c:271:7: warning: shift count >= width of type
[-Wshift-count-overflow]
if (btrfs_test_opt(fs_info, AUTH_KEY))
{
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:147:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
13 warnings generated.
vim +608 fs/btrfs/super.c
547
548 /*
549 * Regular mount options parser. Everything that is needed only when
550 * reading in a new superblock is parsed here.
551 * XXX JDM: This needs to be cleaned up for remount.
552 */
553 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
554 unsigned long new_flags)
555 {
556 substring_t args[MAX_OPT_ARGS];
557 char *p, *num;
558 int intarg;
559 int ret = 0;
560 char *compress_type;
561 bool compress_force = false;
562 enum btrfs_compression_type saved_compress_type;
563 int saved_compress_level;
564 bool saved_compress_force;
565 int no_compress = 0;
566
567 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
568 btrfs_set_opt(info->mount_opt, FREE_SPACE_TREE);
569 else if (btrfs_free_space_cache_v1_active(info)) {
570 if (btrfs_is_zoned(info)) {
571 btrfs_info(info,
572 "zoned: clearing existing space cache");
573 btrfs_set_super_cache_generation(info->super_copy, 0);
574 } else {
575 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
576 }
577 }
578
579 /*
580 * Even the options are empty, we still need to do extra check
581 * against new flags
582 */
583 if (!options)
584 goto check;
585
586 while ((p = strsep(&options, ",")) != NULL) {
587 int token;
588 if (!*p)
589 continue;
590
591 token = match_token(p, tokens, args);
592 switch (token) {
593 case Opt_degraded:
594 btrfs_info(info, "allowing degraded mounts");
595 btrfs_set_opt(info->mount_opt, DEGRADED);
596 break;
597 case Opt_subvol:
598 case Opt_subvol_empty:
599 case Opt_subvolid:
600 case Opt_device:
601 /*
602 * These are parsed by btrfs_parse_subvol_options
603 * and btrfs_parse_early_options
604 * and can be happily ignored here.
605 */
606 break;
607 case Opt_nodatasum:
608 if (btrfs_test_opt(info, AUTH_KEY)) {
609 btrfs_info(info,
610 "nodatasum not supported on an authnticated file-system");
611 break;
612 }
613 btrfs_set_and_info(info, NODATASUM,
614 "setting nodatasum");
615 break;
616 case Opt_datasum:
617 if (btrfs_test_opt(info, NODATASUM)) {
618 if (btrfs_test_opt(info, NODATACOW))
619 btrfs_info(info,
620 "setting datasum, datacow enabled");
621 else
622 btrfs_info(info, "setting datasum");
623 }
624 btrfs_clear_opt(info->mount_opt, NODATACOW);
625 btrfs_clear_opt(info->mount_opt, NODATASUM);
626 break;
627 case Opt_nodatacow:
628 if (btrfs_test_opt(info, AUTH_KEY)) {
629 btrfs_info(info,
630 "nodatacow not supported on an authnticated file-system");
631 break;
632 }
633 if (!btrfs_test_opt(info, NODATACOW)) {
634 if (!btrfs_test_opt(info, COMPRESS) ||
635 !btrfs_test_opt(info, FORCE_COMPRESS)) {
636 btrfs_info(info,
637 "setting nodatacow, compression disabled");
638 } else {
639 btrfs_info(info, "setting nodatacow");
640 }
641 }
642 btrfs_clear_opt(info->mount_opt, COMPRESS);
643 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
644 btrfs_set_opt(info->mount_opt, NODATACOW);
645 btrfs_set_opt(info->mount_opt, NODATASUM);
646 break;
647 case Opt_datacow:
648 btrfs_clear_and_info(info, NODATACOW,
649 "setting datacow");
650 break;
651 case Opt_compress_force:
652 case Opt_compress_force_type:
653 compress_force = true;
654 fallthrough;
655 case Opt_compress:
656 case Opt_compress_type:
657 saved_compress_type = btrfs_test_opt(info,
658 COMPRESS) ?
659 info->compress_type : BTRFS_COMPRESS_NONE;
660 saved_compress_force =
661 btrfs_test_opt(info, FORCE_COMPRESS);
662 saved_compress_level = info->compress_level;
663 if (token == Opt_compress ||
664 token == Opt_compress_force ||
665 strncmp(args[0].from, "zlib", 4) == 0) {
666 compress_type = "zlib";
667
668 info->compress_type = BTRFS_COMPRESS_ZLIB;
669 info->compress_level = BTRFS_ZLIB_DEFAULT_LEVEL;
670 /*
671 * args[0] contains uninitialized data since
672 * for these tokens we don't expect any
673 * parameter.
674 */
675 if (token != Opt_compress &&
676 token != Opt_compress_force)
677 info->compress_level =
678 btrfs_compress_str2level(
679 BTRFS_COMPRESS_ZLIB,
680 args[0].from + 4);
681 btrfs_set_opt(info->mount_opt, COMPRESS);
682 btrfs_clear_opt(info->mount_opt, NODATACOW);
683 btrfs_clear_opt(info->mount_opt, NODATASUM);
684 no_compress = 0;
685 } else if (strncmp(args[0].from, "lzo", 3) == 0) {
686 compress_type = "lzo";
687 info->compress_type = BTRFS_COMPRESS_LZO;
688 info->compress_level = 0;
689 btrfs_set_opt(info->mount_opt, COMPRESS);
690 btrfs_clear_opt(info->mount_opt, NODATACOW);
691 btrfs_clear_opt(info->mount_opt, NODATASUM);
692 btrfs_set_fs_incompat(info, COMPRESS_LZO);
693 no_compress = 0;
694 } else if (strncmp(args[0].from, "zstd", 4) == 0) {
695 compress_type = "zstd";
696 info->compress_type = BTRFS_COMPRESS_ZSTD;
697 info->compress_level =
698 btrfs_compress_str2level(
699 BTRFS_COMPRESS_ZSTD,
700 args[0].from + 4);
701 btrfs_set_opt(info->mount_opt, COMPRESS);
702 btrfs_clear_opt(info->mount_opt, NODATACOW);
703 btrfs_clear_opt(info->mount_opt, NODATASUM);
704 btrfs_set_fs_incompat(info, COMPRESS_ZSTD);
705 no_compress = 0;
706 } else if (strncmp(args[0].from, "no", 2) == 0) {
707 compress_type = "no";
708 info->compress_level = 0;
709 info->compress_type = 0;
710 btrfs_clear_opt(info->mount_opt, COMPRESS);
711 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
712 compress_force = false;
713 no_compress++;
714 } else {
715 ret = -EINVAL;
716 goto out;
717 }
718
719 if (compress_force) {
720 btrfs_set_opt(info->mount_opt, FORCE_COMPRESS);
721 } else {
722 /*
723 * If we remount from compress-force=xxx to
724 * compress=xxx, we need clear FORCE_COMPRESS
725 * flag, otherwise, there is no way for users
726 * to disable forcible compression separately.
727 */
728 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
729 }
730 if (no_compress == 1) {
731 btrfs_info(info, "use no compression");
732 } else if ((info->compress_type != saved_compress_type) ||
733 (compress_force != saved_compress_force) ||
734 (info->compress_level != saved_compress_level)) {
735 btrfs_info(info, "%s %s compression, level %d",
736 (compress_force) ? "force" : "use",
737 compress_type, info->compress_level);
738 }
739 compress_force = false;
740 break;
741 case Opt_ssd:
742 btrfs_set_and_info(info, SSD,
743 "enabling ssd optimizations");
744 btrfs_clear_opt(info->mount_opt, NOSSD);
745 break;
746 case Opt_ssd_spread:
747 btrfs_set_and_info(info, SSD,
748 "enabling ssd optimizations");
749 btrfs_set_and_info(info, SSD_SPREAD,
750 "using spread ssd allocation scheme");
751 btrfs_clear_opt(info->mount_opt, NOSSD);
752 break;
753 case Opt_nossd:
754 btrfs_set_opt(info->mount_opt, NOSSD);
755 btrfs_clear_and_info(info, SSD,
756 "not using ssd optimizations");
757 fallthrough;
758 case Opt_nossd_spread:
759 btrfs_clear_and_info(info, SSD_SPREAD,
760 "not using spread ssd allocation scheme");
761 break;
762 case Opt_barrier:
763 btrfs_clear_and_info(info, NOBARRIER,
764 "turning on barriers");
765 break;
766 case Opt_nobarrier:
767 btrfs_set_and_info(info, NOBARRIER,
768 "turning off barriers");
769 break;
770 case Opt_thread_pool:
771 ret = match_int(&args[0], &intarg);
772 if (ret) {
773 goto out;
774 } else if (intarg == 0) {
775 ret = -EINVAL;
776 goto out;
777 }
778 info->thread_pool_size = intarg;
779 break;
780 case Opt_max_inline:
781 num = match_strdup(&args[0]);
782 if (num) {
783 info->max_inline = memparse(num, NULL);
784 kfree(num);
785
786 if (info->max_inline) {
787 info->max_inline = min_t(u64,
788 info->max_inline,
789 info->sectorsize);
790 }
791 btrfs_info(info, "max_inline at %llu",
792 info->max_inline);
793 } else {
794 ret = -ENOMEM;
795 goto out;
796 }
797 break;
798 case Opt_acl:
799 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
800 info->sb->s_flags |= SB_POSIXACL;
801 break;
802 #else
803 btrfs_err(info, "support for ACL not compiled in!");
804 ret = -EINVAL;
805 goto out;
806 #endif
807 case Opt_noacl:
808 info->sb->s_flags &= ~SB_POSIXACL;
809 break;
810 case Opt_notreelog:
811 btrfs_set_and_info(info, NOTREELOG,
812 "disabling tree log");
813 break;
814 case Opt_treelog:
815 btrfs_clear_and_info(info, NOTREELOG,
816 "enabling tree log");
817 break;
818 case Opt_norecovery:
819 case Opt_nologreplay:
820 btrfs_warn(info,
821 "'nologreplay' is deprecated, use 'rescue=nologreplay'
instead");
822 btrfs_set_and_info(info, NOLOGREPLAY,
823 "disabling log replay at mount time");
824 break;
825 case Opt_flushoncommit:
826 btrfs_set_and_info(info, FLUSHONCOMMIT,
827 "turning on flush-on-commit");
828 break;
829 case Opt_noflushoncommit:
830 btrfs_clear_and_info(info, FLUSHONCOMMIT,
831 "turning off flush-on-commit");
832 break;
833 case Opt_ratio:
834 ret = match_int(&args[0], &intarg);
835 if (ret)
836 goto out;
837 info->metadata_ratio = intarg;
838 btrfs_info(info, "metadata ratio %u",
839 info->metadata_ratio);
840 break;
841 case Opt_discard:
842 case Opt_discard_mode:
843 if (token == Opt_discard ||
844 strcmp(args[0].from, "sync") == 0) {
845 btrfs_clear_opt(info->mount_opt, DISCARD_ASYNC);
846 btrfs_set_and_info(info, DISCARD_SYNC,
847 "turning on sync discard");
848 } else if (strcmp(args[0].from, "async") == 0) {
849 btrfs_clear_opt(info->mount_opt, DISCARD_SYNC);
850 btrfs_set_and_info(info, DISCARD_ASYNC,
851 "turning on async discard");
852 } else {
853 ret = -EINVAL;
854 goto out;
855 }
856 break;
857 case Opt_nodiscard:
858 btrfs_clear_and_info(info, DISCARD_SYNC,
859 "turning off discard");
860 btrfs_clear_and_info(info, DISCARD_ASYNC,
861 "turning off async discard");
862 break;
863 case Opt_space_cache:
864 case Opt_space_cache_version:
865 if (token == Opt_space_cache ||
866 strcmp(args[0].from, "v1") == 0) {
867 btrfs_clear_opt(info->mount_opt,
868 FREE_SPACE_TREE);
869 btrfs_set_and_info(info, SPACE_CACHE,
870 "enabling disk space caching");
871 } else if (strcmp(args[0].from, "v2") == 0) {
872 btrfs_clear_opt(info->mount_opt,
873 SPACE_CACHE);
874 btrfs_set_and_info(info, FREE_SPACE_TREE,
875 "enabling free space tree");
876 } else {
877 ret = -EINVAL;
878 goto out;
879 }
880 break;
881 case Opt_rescan_uuid_tree:
882 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE);
883 break;
884 case Opt_no_space_cache:
885 if (btrfs_test_opt(info, SPACE_CACHE)) {
886 btrfs_clear_and_info(info, SPACE_CACHE,
887 "disabling disk space caching");
888 }
889 if (btrfs_test_opt(info, FREE_SPACE_TREE)) {
890 btrfs_clear_and_info(info, FREE_SPACE_TREE,
891 "disabling free space tree");
892 }
893 break;
894 case Opt_inode_cache:
895 case Opt_noinode_cache:
896 btrfs_warn(info,
897 "the 'inode_cache' option is deprecated and has no effect since
5.11");
898 break;
899 case Opt_clear_cache:
900 btrfs_set_and_info(info, CLEAR_CACHE,
901 "force clearing of disk cache");
902 break;
903 case Opt_user_subvol_rm_allowed:
904 btrfs_set_opt(info->mount_opt, USER_SUBVOL_RM_ALLOWED);
905 break;
906 case Opt_enospc_debug:
907 btrfs_set_opt(info->mount_opt, ENOSPC_DEBUG);
908 break;
909 case Opt_noenospc_debug:
910 btrfs_clear_opt(info->mount_opt, ENOSPC_DEBUG);
911 break;
912 case Opt_defrag:
913 btrfs_set_and_info(info, AUTO_DEFRAG,
914 "enabling auto defrag");
915 break;
916 case Opt_nodefrag:
917 btrfs_clear_and_info(info, AUTO_DEFRAG,
918 "disabling auto defrag");
919 break;
920 case Opt_recovery:
921 case Opt_usebackuproot:
922 btrfs_warn(info,
923 "'%s' is deprecated, use 'rescue=usebackuproot'
instead",
924 token == Opt_recovery ? "recovery" :
925 "usebackuproot");
926 btrfs_info(info,
927 "trying to use backup root at mount time");
928 btrfs_set_opt(info->mount_opt, USEBACKUPROOT);
929 break;
930 case Opt_skip_balance:
931 btrfs_set_opt(info->mount_opt, SKIP_BALANCE);
932 break;
933 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
934 case Opt_check_integrity_including_extent_data:
935 btrfs_info(info,
936 "enabling check integrity including extent data");
937 btrfs_set_opt(info->mount_opt,
938 CHECK_INTEGRITY_INCLUDING_EXTENT_DATA);
939 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
940 break;
941 case Opt_check_integrity:
942 btrfs_info(info, "enabling check integrity");
943 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
944 break;
945 case Opt_check_integrity_print_mask:
946 ret = match_int(&args[0], &intarg);
947 if (ret)
948 goto out;
949 info->check_integrity_print_mask = intarg;
950 btrfs_info(info, "check_integrity_print_mask 0x%x",
951 info->check_integrity_print_mask);
952 break;
953 #else
954 case Opt_check_integrity_including_extent_data:
955 case Opt_check_integrity:
956 case Opt_check_integrity_print_mask:
957 btrfs_err(info,
958 "support for check_integrity* not compiled in!");
959 ret = -EINVAL;
960 goto out;
961 #endif
962 case Opt_fatal_errors:
963 if (strcmp(args[0].from, "panic") == 0)
964 btrfs_set_opt(info->mount_opt,
965 PANIC_ON_FATAL_ERROR);
966 else if (strcmp(args[0].from, "bug") == 0)
967 btrfs_clear_opt(info->mount_opt,
968 PANIC_ON_FATAL_ERROR);
969 else {
970 ret = -EINVAL;
971 goto out;
972 }
973 break;
974 case Opt_commit_interval:
975 intarg = 0;
976 ret = match_int(&args[0], &intarg);
977 if (ret)
978 goto out;
979 if (intarg == 0) {
980 btrfs_info(info,
981 "using default commit interval %us",
982 BTRFS_DEFAULT_COMMIT_INTERVAL);
983 intarg = BTRFS_DEFAULT_COMMIT_INTERVAL;
984 } else if (intarg > 300) {
985 btrfs_warn(info, "excessive commit interval %d",
986 intarg);
987 }
988 info->commit_interval = intarg;
989 break;
990 case Opt_rescue:
991 ret = parse_rescue_options(info, args[0].from);
992 if (ret < 0)
993 goto out;
994 break;
995 #ifdef CONFIG_BTRFS_DEBUG
996 case Opt_fragment_all:
997 btrfs_info(info, "fragmenting all space");
998 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
999 btrfs_set_opt(info->mount_opt, FRAGMENT_METADATA);
1000 break;
1001 case Opt_fragment_metadata:
1002 btrfs_info(info, "fragmenting metadata");
1003 btrfs_set_opt(info->mount_opt,
1004 FRAGMENT_METADATA);
1005 break;
1006 case Opt_fragment_data:
1007 btrfs_info(info, "fragmenting data");
1008 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
1009 break;
1010 #endif
1011 #ifdef CONFIG_BTRFS_FS_REF_VERIFY
1012 case Opt_ref_verify:
1013 btrfs_info(info, "doing ref verification");
1014 btrfs_set_opt(info->mount_opt, REF_VERIFY);
1015 break;
1016 #endif
1017 case Opt_err:
1018 btrfs_err(info, "unrecognized mount option '%s'", p);
1019 ret = -EINVAL;
1020 goto out;
1021 default:
1022 break;
1023 }
1024 }
1025 check:
1026 /* We're read-only, don't have to check. */
1027 if (new_flags & SB_RDONLY)
1028 goto out;
1029
1030 if (check_ro_option(info, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") ||
1031 check_ro_option(info, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots")
||
1032 check_ro_option(info, BTRFS_MOUNT_IGNOREDATACSUMS,
"ignoredatacsums"))
1033 ret = -EINVAL;
1034 out:
1035 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) &&
1036 !btrfs_test_opt(info, FREE_SPACE_TREE) &&
1037 !btrfs_test_opt(info, CLEAR_CACHE)) {
1038 btrfs_err(info, "cannot disable free space tree");
1039 ret = -EINVAL;
1040
1041 }
1042 if (!ret)
1043 ret = btrfs_check_mountopts_zoned(info);
1044 if (!ret && btrfs_test_opt(info, SPACE_CACHE))
1045 btrfs_info(info, "disk space caching is enabled");
1046 if (!ret && btrfs_test_opt(info, FREE_SPACE_TREE))
1047 btrfs_info(info, "using free space tree");
1048 return ret;
1049 }
1050
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org