* [kdave-btrfs-devel:dev/auth-hash 158/162] fs/btrfs/super.c:608:29: sparse: sparse: shift too big (32) for type int
@ 2021-02-17 23:57 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-17 23:57 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 44880 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Johannes Thumshirn <johannes.thumshirn@wdc.com>
CC: David Sterba <dsterba@suse.com>
tree: https://github.com/kdave/btrfs-devel.git dev/auth-hash
head: 212f7564065bdfda0a55ab1ef52a4868572359de
commit: 13be51617b056261da9212d109c77311a895bb6f [158/162] btrfs: add authentication support
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago
config: alpha-randconfig-s031-20210217 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/kdave/btrfs-devel/commit/13be51617b056261da9212d109c77311a895bb6f
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=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> fs/btrfs/super.c:608:29: sparse: sparse: shift too big (32) for type int
fs/btrfs/super.c:1127:17: sparse: sparse: shift too big (32) for type int
fs/btrfs/super.c:1574:13: sparse: sparse: shift too big (32) for type int
--
>> fs/btrfs/disk-io.c:2321:14: sparse: sparse: shift too big (32) for type int
--
>> fs/btrfs/ioctl.c:271:21: sparse: sparse: shift too big (32) for type int
vim +608 fs/btrfs/super.c
74ef00185eb864 Qu Wenruo 2020-06-04 547
edf24abe51493c Christoph Hellwig 2008-06-10 548 /*
edf24abe51493c Christoph Hellwig 2008-06-10 549 * Regular mount options parser. Everything that is needed only when
edf24abe51493c Christoph Hellwig 2008-06-10 550 * reading in a new superblock is parsed here.
49b25e0540904b Jeff Mahoney 2012-03-01 551 * XXX JDM: This needs to be cleaned up for remount.
edf24abe51493c Christoph Hellwig 2008-06-10 552 */
2ff7e61e0d30ff Jeff Mahoney 2016-06-22 553 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
96da09192cda57 Qu Wenruo 2016-01-19 554 unsigned long new_flags)
95e0528919cb0c Chris Mason 2007-08-29 555 {
95e0528919cb0c Chris Mason 2007-08-29 556 substring_t args[MAX_OPT_ARGS];
e215772cd2abcf Misono, Tomohiro 2017-12-14 557 char *p, *num;
4543df7ecc8ae4 Chris Mason 2008-06-11 558 int intarg;
a7a3f7cadd9bde Sage Weil 2009-11-07 559 int ret = 0;
261507a02ccba9 Li Zefan 2010-12-17 560 char *compress_type;
261507a02ccba9 Li Zefan 2010-12-17 561 bool compress_force = false;
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 562 enum btrfs_compression_type saved_compress_type;
27942c9971cc40 David Sterba 2020-07-23 563 int saved_compress_level;
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 564 bool saved_compress_force;
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 565 int no_compress = 0;
b6cda9bcb4df75 Chris Mason 2007-12-14 566
0b246afa62b0cf Jeff Mahoney 2016-06-22 567 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
70f6d82ec73c3a Omar Sandoval 2015-09-29 568 btrfs_set_opt(info->mount_opt, FREE_SPACE_TREE);
948462294577a3 Boris Burkov 2020-11-18 569 else if (btrfs_free_space_cache_v1_active(info)) {
5d1ab66c56fed1 Naohiro Aota 2020-11-10 570 if (btrfs_is_zoned(info)) {
5d1ab66c56fed1 Naohiro Aota 2020-11-10 571 btrfs_info(info,
5d1ab66c56fed1 Naohiro Aota 2020-11-10 572 "zoned: clearing existing space cache");
5d1ab66c56fed1 Naohiro Aota 2020-11-10 573 btrfs_set_super_cache_generation(info->super_copy, 0);
5d1ab66c56fed1 Naohiro Aota 2020-11-10 574 } else {
73bc187680f94b Josef Bacik 2011-10-03 575 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
5d1ab66c56fed1 Naohiro Aota 2020-11-10 576 }
5d1ab66c56fed1 Naohiro Aota 2020-11-10 577 }
73bc187680f94b Josef Bacik 2011-10-03 578
96da09192cda57 Qu Wenruo 2016-01-19 579 /*
96da09192cda57 Qu Wenruo 2016-01-19 580 * Even the options are empty, we still need to do extra check
96da09192cda57 Qu Wenruo 2016-01-19 581 * against new flags
96da09192cda57 Qu Wenruo 2016-01-19 582 */
95e0528919cb0c Chris Mason 2007-08-29 583 if (!options)
96da09192cda57 Qu Wenruo 2016-01-19 584 goto check;
95e0528919cb0c Chris Mason 2007-08-29 585
95e0528919cb0c Chris Mason 2007-08-29 586 while ((p = strsep(&options, ",")) != NULL) {
95e0528919cb0c Chris Mason 2007-08-29 587 int token;
95e0528919cb0c Chris Mason 2007-08-29 588 if (!*p)
95e0528919cb0c Chris Mason 2007-08-29 589 continue;
95e0528919cb0c Chris Mason 2007-08-29 590
95e0528919cb0c Chris Mason 2007-08-29 591 token = match_token(p, tokens, args);
95e0528919cb0c Chris Mason 2007-08-29 592 switch (token) {
dfe25020689bb2 Chris Mason 2008-05-13 593 case Opt_degraded:
0b246afa62b0cf Jeff Mahoney 2016-06-22 594 btrfs_info(info, "allowing degraded mounts");
dfe25020689bb2 Chris Mason 2008-05-13 595 btrfs_set_opt(info->mount_opt, DEGRADED);
dfe25020689bb2 Chris Mason 2008-05-13 596 break;
95e0528919cb0c Chris Mason 2007-08-29 597 case Opt_subvol:
37becec95ac31b Omar Sandoval 2018-05-21 598 case Opt_subvol_empty:
73f73415caddbc Josef Bacik 2009-12-04 599 case Opt_subvolid:
43e570b08a6c6b Christoph Hellwig 2008-06-10 600 case Opt_device:
edf24abe51493c Christoph Hellwig 2008-06-10 601 /*
39df2a4b231747 Johannes Thumshirn 2020-05-14 602 * These are parsed by btrfs_parse_subvol_options
39df2a4b231747 Johannes Thumshirn 2020-05-14 603 * and btrfs_parse_early_options
39df2a4b231747 Johannes Thumshirn 2020-05-14 604 * and can be happily ignored here.
edf24abe51493c Christoph Hellwig 2008-06-10 605 */
95e0528919cb0c Chris Mason 2007-08-29 606 break;
b6cda9bcb4df75 Chris Mason 2007-12-14 607 case Opt_nodatasum:
13be51617b0562 Johannes Thumshirn 2020-05-14 @608 if (btrfs_test_opt(info, AUTH_KEY)) {
13be51617b0562 Johannes Thumshirn 2020-05-14 609 btrfs_info(info,
13be51617b0562 Johannes Thumshirn 2020-05-14 610 "nodatasum not supported on an authnticated file-system");
13be51617b0562 Johannes Thumshirn 2020-05-14 611 break;
13be51617b0562 Johannes Thumshirn 2020-05-14 612 }
3cdde2240d4533 Jeff Mahoney 2016-06-09 613 btrfs_set_and_info(info, NODATASUM,
078025347c8ed4 Qu Wenruo 2014-01-13 614 "setting nodatasum");
be20aa9dbadc8c Chris Mason 2007-12-17 615 break;
d399167d88ea53 Qu Wenruo 2014-01-06 616 case Opt_datasum:
3cdde2240d4533 Jeff Mahoney 2016-06-09 617 if (btrfs_test_opt(info, NODATASUM)) {
3cdde2240d4533 Jeff Mahoney 2016-06-09 618 if (btrfs_test_opt(info, NODATACOW))
0b246afa62b0cf Jeff Mahoney 2016-06-22 619 btrfs_info(info,
5d163e0e68ce74 Jeff Mahoney 2016-09-20 620 "setting datasum, datacow enabled");
d399167d88ea53 Qu Wenruo 2014-01-06 621 else
0b246afa62b0cf Jeff Mahoney 2016-06-22 622 btrfs_info(info, "setting datasum");
078025347c8ed4 Qu Wenruo 2014-01-13 623 }
d399167d88ea53 Qu Wenruo 2014-01-06 624 btrfs_clear_opt(info->mount_opt, NODATACOW);
d399167d88ea53 Qu Wenruo 2014-01-06 625 btrfs_clear_opt(info->mount_opt, NODATASUM);
d399167d88ea53 Qu Wenruo 2014-01-06 626 break;
be20aa9dbadc8c Chris Mason 2007-12-17 627 case Opt_nodatacow:
13be51617b0562 Johannes Thumshirn 2020-05-14 628 if (btrfs_test_opt(info, AUTH_KEY)) {
13be51617b0562 Johannes Thumshirn 2020-05-14 629 btrfs_info(info,
13be51617b0562 Johannes Thumshirn 2020-05-14 630 "nodatacow not supported on an authnticated file-system");
13be51617b0562 Johannes Thumshirn 2020-05-14 631 break;
13be51617b0562 Johannes Thumshirn 2020-05-14 632 }
3cdde2240d4533 Jeff Mahoney 2016-06-09 633 if (!btrfs_test_opt(info, NODATACOW)) {
3cdde2240d4533 Jeff Mahoney 2016-06-09 634 if (!btrfs_test_opt(info, COMPRESS) ||
3cdde2240d4533 Jeff Mahoney 2016-06-09 635 !btrfs_test_opt(info, FORCE_COMPRESS)) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 636 btrfs_info(info,
efe120a067c867 Frank Holton 2013-12-20 637 "setting nodatacow, compression disabled");
bedb2cca7252d0 Andrei Popa 2012-09-20 638 } else {
0b246afa62b0cf Jeff Mahoney 2016-06-22 639 btrfs_info(info, "setting nodatacow");
bedb2cca7252d0 Andrei Popa 2012-09-20 640 }
078025347c8ed4 Qu Wenruo 2014-01-13 641 }
bedb2cca7252d0 Andrei Popa 2012-09-20 642 btrfs_clear_opt(info->mount_opt, COMPRESS);
bedb2cca7252d0 Andrei Popa 2012-09-20 643 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
be20aa9dbadc8c Chris Mason 2007-12-17 644 btrfs_set_opt(info->mount_opt, NODATACOW);
b6cda9bcb4df75 Chris Mason 2007-12-14 645 btrfs_set_opt(info->mount_opt, NODATASUM);
b6cda9bcb4df75 Chris Mason 2007-12-14 646 break;
a258af7a3e395a Qu Wenruo 2014-01-06 647 case Opt_datacow:
3cdde2240d4533 Jeff Mahoney 2016-06-09 648 btrfs_clear_and_info(info, NODATACOW,
078025347c8ed4 Qu Wenruo 2014-01-13 649 "setting datacow");
a258af7a3e395a Qu Wenruo 2014-01-06 650 break;
261507a02ccba9 Li Zefan 2010-12-17 651 case Opt_compress_force:
261507a02ccba9 Li Zefan 2010-12-17 652 case Opt_compress_force_type:
261507a02ccba9 Li Zefan 2010-12-17 653 compress_force = true;
c730ae0c6bb312 Marcos Paulo de Souza 2020-06-16 654 fallthrough;
c8b978188c9a0f Chris Mason 2008-10-29 655 case Opt_compress:
261507a02ccba9 Li Zefan 2010-12-17 656 case Opt_compress_type:
3cdde2240d4533 Jeff Mahoney 2016-06-09 657 saved_compress_type = btrfs_test_opt(info,
3cdde2240d4533 Jeff Mahoney 2016-06-09 658 COMPRESS) ?
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 659 info->compress_type : BTRFS_COMPRESS_NONE;
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 660 saved_compress_force =
3cdde2240d4533 Jeff Mahoney 2016-06-09 661 btrfs_test_opt(info, FORCE_COMPRESS);
27942c9971cc40 David Sterba 2020-07-23 662 saved_compress_level = info->compress_level;
261507a02ccba9 Li Zefan 2010-12-17 663 if (token == Opt_compress ||
261507a02ccba9 Li Zefan 2010-12-17 664 token == Opt_compress_force ||
a7164fa4e055da David Sterba 2017-07-17 665 strncmp(args[0].from, "zlib", 4) == 0) {
261507a02ccba9 Li Zefan 2010-12-17 666 compress_type = "zlib";
eae8d82529dd98 Qu Wenruo 2017-11-06 667
261507a02ccba9 Li Zefan 2010-12-17 668 info->compress_type = BTRFS_COMPRESS_ZLIB;
eae8d82529dd98 Qu Wenruo 2017-11-06 669 info->compress_level = BTRFS_ZLIB_DEFAULT_LEVEL;
eae8d82529dd98 Qu Wenruo 2017-11-06 670 /*
eae8d82529dd98 Qu Wenruo 2017-11-06 671 * args[0] contains uninitialized data since
eae8d82529dd98 Qu Wenruo 2017-11-06 672 * for these tokens we don't expect any
eae8d82529dd98 Qu Wenruo 2017-11-06 673 * parameter.
eae8d82529dd98 Qu Wenruo 2017-11-06 674 */
eae8d82529dd98 Qu Wenruo 2017-11-06 675 if (token != Opt_compress &&
eae8d82529dd98 Qu Wenruo 2017-11-06 676 token != Opt_compress_force)
f51d2b59120ff3 David Sterba 2017-09-15 677 info->compress_level =
d0ab62ce2ded36 Dennis Zhou 2019-02-04 678 btrfs_compress_str2level(
d0ab62ce2ded36 Dennis Zhou 2019-02-04 679 BTRFS_COMPRESS_ZLIB,
d0ab62ce2ded36 Dennis Zhou 2019-02-04 680 args[0].from + 4);
063849eafda03e Arnd Hannemann 2012-04-16 681 btrfs_set_opt(info->mount_opt, COMPRESS);
bedb2cca7252d0 Andrei Popa 2012-09-20 682 btrfs_clear_opt(info->mount_opt, NODATACOW);
bedb2cca7252d0 Andrei Popa 2012-09-20 683 btrfs_clear_opt(info->mount_opt, NODATASUM);
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 684 no_compress = 0;
a7164fa4e055da David Sterba 2017-07-17 685 } else if (strncmp(args[0].from, "lzo", 3) == 0) {
a6fa6fae40ec33 Li Zefan 2010-10-25 686 compress_type = "lzo";
a6fa6fae40ec33 Li Zefan 2010-10-25 687 info->compress_type = BTRFS_COMPRESS_LZO;
282dd7d7718444 Marcos Paulo de Souza 2020-08-03 688 info->compress_level = 0;
063849eafda03e Arnd Hannemann 2012-04-16 689 btrfs_set_opt(info->mount_opt, COMPRESS);
bedb2cca7252d0 Andrei Popa 2012-09-20 690 btrfs_clear_opt(info->mount_opt, NODATACOW);
bedb2cca7252d0 Andrei Popa 2012-09-20 691 btrfs_clear_opt(info->mount_opt, NODATASUM);
2b0ce2c2909368 Mitch Harder 2012-07-24 692 btrfs_set_fs_incompat(info, COMPRESS_LZO);
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 693 no_compress = 0;
3f93aef535c8ea Dennis Zhou 2019-02-04 694 } else if (strncmp(args[0].from, "zstd", 4) == 0) {
5c1aab1dd5445e Nick Terrell 2017-08-09 695 compress_type = "zstd";
5c1aab1dd5445e Nick Terrell 2017-08-09 696 info->compress_type = BTRFS_COMPRESS_ZSTD;
3f93aef535c8ea Dennis Zhou 2019-02-04 697 info->compress_level =
3f93aef535c8ea Dennis Zhou 2019-02-04 698 btrfs_compress_str2level(
3f93aef535c8ea Dennis Zhou 2019-02-04 699 BTRFS_COMPRESS_ZSTD,
3f93aef535c8ea Dennis Zhou 2019-02-04 700 args[0].from + 4);
5c1aab1dd5445e Nick Terrell 2017-08-09 701 btrfs_set_opt(info->mount_opt, COMPRESS);
5c1aab1dd5445e Nick Terrell 2017-08-09 702 btrfs_clear_opt(info->mount_opt, NODATACOW);
5c1aab1dd5445e Nick Terrell 2017-08-09 703 btrfs_clear_opt(info->mount_opt, NODATASUM);
5c1aab1dd5445e Nick Terrell 2017-08-09 704 btrfs_set_fs_incompat(info, COMPRESS_ZSTD);
5c1aab1dd5445e Nick Terrell 2017-08-09 705 no_compress = 0;
063849eafda03e Arnd Hannemann 2012-04-16 706 } else if (strncmp(args[0].from, "no", 2) == 0) {
063849eafda03e Arnd Hannemann 2012-04-16 707 compress_type = "no";
27942c9971cc40 David Sterba 2020-07-23 708 info->compress_level = 0;
27942c9971cc40 David Sterba 2020-07-23 709 info->compress_type = 0;
063849eafda03e Arnd Hannemann 2012-04-16 710 btrfs_clear_opt(info->mount_opt, COMPRESS);
063849eafda03e Arnd Hannemann 2012-04-16 711 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
063849eafda03e Arnd Hannemann 2012-04-16 712 compress_force = false;
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 713 no_compress++;
261507a02ccba9 Li Zefan 2010-12-17 714 } else {
261507a02ccba9 Li Zefan 2010-12-17 715 ret = -EINVAL;
261507a02ccba9 Li Zefan 2010-12-17 716 goto out;
261507a02ccba9 Li Zefan 2010-12-17 717 }
261507a02ccba9 Li Zefan 2010-12-17 718
261507a02ccba9 Li Zefan 2010-12-17 719 if (compress_force) {
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 720 btrfs_set_opt(info->mount_opt, FORCE_COMPRESS);
143f3636185584 David Sterba 2014-07-29 721 } else {
4027e0f4c4b2df Wang Shilong 2014-06-30 722 /*
4027e0f4c4b2df Wang Shilong 2014-06-30 723 * If we remount from compress-force=xxx to
4027e0f4c4b2df Wang Shilong 2014-06-30 724 * compress=xxx, we need clear FORCE_COMPRESS
4027e0f4c4b2df Wang Shilong 2014-06-30 725 * flag, otherwise, there is no way for users
4027e0f4c4b2df Wang Shilong 2014-06-30 726 * to disable forcible compression separately.
4027e0f4c4b2df Wang Shilong 2014-06-30 727 */
4027e0f4c4b2df Wang Shilong 2014-06-30 728 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
a7e252af5a819e Miao Xie 2013-11-22 729 }
27942c9971cc40 David Sterba 2020-07-23 730 if (no_compress == 1) {
27942c9971cc40 David Sterba 2020-07-23 731 btrfs_info(info, "use no compression");
27942c9971cc40 David Sterba 2020-07-23 732 } else if ((info->compress_type != saved_compress_type) ||
27942c9971cc40 David Sterba 2020-07-23 733 (compress_force != saved_compress_force) ||
27942c9971cc40 David Sterba 2020-07-23 734 (info->compress_level != saved_compress_level)) {
f51d2b59120ff3 David Sterba 2017-09-15 735 btrfs_info(info, "%s %s compression, level %d",
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 736 (compress_force) ? "force" : "use",
f51d2b59120ff3 David Sterba 2017-09-15 737 compress_type, info->compress_level);
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 738 }
b7c47bbb2d1856 Tsutomu Itoh 2016-01-06 739 compress_force = false;
a555f810af6d63 Chris Mason 2010-01-28 740 break;
e18e4809b10e6c Chris Mason 2008-01-18 741 case Opt_ssd:
3cdde2240d4533 Jeff Mahoney 2016-06-09 742 btrfs_set_and_info(info, SSD,
583b723151794e Hans van Kranenburg 2017-07-28 743 "enabling ssd optimizations");
951e7966398b0f Adam Borowski 2017-03-31 744 btrfs_clear_opt(info->mount_opt, NOSSD);
e18e4809b10e6c Chris Mason 2008-01-18 745 break;
451d7585a8bb1b Chris Mason 2009-06-09 746 case Opt_ssd_spread:
583b723151794e Hans van Kranenburg 2017-07-28 747 btrfs_set_and_info(info, SSD,
583b723151794e Hans van Kranenburg 2017-07-28 748 "enabling ssd optimizations");
3cdde2240d4533 Jeff Mahoney 2016-06-09 749 btrfs_set_and_info(info, SSD_SPREAD,
583b723151794e Hans van Kranenburg 2017-07-28 750 "using spread ssd allocation scheme");
951e7966398b0f Adam Borowski 2017-03-31 751 btrfs_clear_opt(info->mount_opt, NOSSD);
451d7585a8bb1b Chris Mason 2009-06-09 752 break;
3b30c22f64a6bb Chris Mason 2009-06-09 753 case Opt_nossd:
583b723151794e Hans van Kranenburg 2017-07-28 754 btrfs_set_opt(info->mount_opt, NOSSD);
583b723151794e Hans van Kranenburg 2017-07-28 755 btrfs_clear_and_info(info, SSD,
583b723151794e Hans van Kranenburg 2017-07-28 756 "not using ssd optimizations");
c730ae0c6bb312 Marcos Paulo de Souza 2020-06-16 757 fallthrough;
62b8e077317971 Howard McLauchlan 2018-03-08 758 case Opt_nossd_spread:
583b723151794e Hans van Kranenburg 2017-07-28 759 btrfs_clear_and_info(info, SSD_SPREAD,
583b723151794e Hans van Kranenburg 2017-07-28 760 "not using spread ssd allocation scheme");
3b30c22f64a6bb Chris Mason 2009-06-09 761 break;
842bef5891aaf1 Qu Wenruo 2014-01-06 762 case Opt_barrier:
3cdde2240d4533 Jeff Mahoney 2016-06-09 763 btrfs_clear_and_info(info, NOBARRIER,
078025347c8ed4 Qu Wenruo 2014-01-13 764 "turning on barriers");
842bef5891aaf1 Qu Wenruo 2014-01-06 765 break;
21ad10cf3e9c1e Chris Mason 2008-01-09 766 case Opt_nobarrier:
3cdde2240d4533 Jeff Mahoney 2016-06-09 767 btrfs_set_and_info(info, NOBARRIER,
078025347c8ed4 Qu Wenruo 2014-01-13 768 "turning off barriers");
21ad10cf3e9c1e Chris Mason 2008-01-09 769 break;
4543df7ecc8ae4 Chris Mason 2008-06-11 770 case Opt_thread_pool:
2c334e87f31783 Wang Shilong 2013-07-24 771 ret = match_int(&args[0], &intarg);
2c334e87f31783 Wang Shilong 2013-07-24 772 if (ret) {
2c334e87f31783 Wang Shilong 2013-07-24 773 goto out;
f7b885befd05fa Anand Jain 2018-02-13 774 } else if (intarg == 0) {
2c334e87f31783 Wang Shilong 2013-07-24 775 ret = -EINVAL;
2c334e87f31783 Wang Shilong 2013-07-24 776 goto out;
2c334e87f31783 Wang Shilong 2013-07-24 777 }
f7b885befd05fa Anand Jain 2018-02-13 778 info->thread_pool_size = intarg;
4543df7ecc8ae4 Chris Mason 2008-06-11 779 break;
6f568d35a045db Chris Mason 2008-01-29 780 case Opt_max_inline:
edf24abe51493c Christoph Hellwig 2008-06-10 781 num = match_strdup(&args[0]);
6f568d35a045db Chris Mason 2008-01-29 782 if (num) {
91748467a5c588 Akinobu Mita 2010-02-28 783 info->max_inline = memparse(num, NULL);
6f568d35a045db Chris Mason 2008-01-29 784 kfree(num);
6f568d35a045db Chris Mason 2008-01-29 785
15ada040d7cd68 Chris Mason 2008-06-11 786 if (info->max_inline) {
feb5f96589302b Mitch Harder 2014-02-13 787 info->max_inline = min_t(u64,
15ada040d7cd68 Chris Mason 2008-06-11 788 info->max_inline,
0b246afa62b0cf Jeff Mahoney 2016-06-22 789 info->sectorsize);
15ada040d7cd68 Chris Mason 2008-06-11 790 }
0b246afa62b0cf Jeff Mahoney 2016-06-22 791 btrfs_info(info, "max_inline at %llu",
c1c9ff7c94e83f Geert Uytterhoeven 2013-08-20 792 info->max_inline);
2c334e87f31783 Wang Shilong 2013-07-24 793 } else {
2c334e87f31783 Wang Shilong 2013-07-24 794 ret = -ENOMEM;
2c334e87f31783 Wang Shilong 2013-07-24 795 goto out;
6f568d35a045db Chris Mason 2008-01-29 796 }
6f568d35a045db Chris Mason 2008-01-29 797 break;
bd0330ad2174d1 Qu Wenruo 2014-01-06 798 case Opt_acl:
45ff35d6b9f301 Guangliang Zhao 2014-05-12 799 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
1751e8a6cb935e Linus Torvalds 2017-11-27 800 info->sb->s_flags |= SB_POSIXACL;
bd0330ad2174d1 Qu Wenruo 2014-01-06 801 break;
45ff35d6b9f301 Guangliang Zhao 2014-05-12 802 #else
0b246afa62b0cf Jeff Mahoney 2016-06-22 803 btrfs_err(info, "support for ACL not compiled in!");
45ff35d6b9f301 Guangliang Zhao 2014-05-12 804 ret = -EINVAL;
45ff35d6b9f301 Guangliang Zhao 2014-05-12 805 goto out;
45ff35d6b9f301 Guangliang Zhao 2014-05-12 806 #endif
33268eaf0b3db5 Josef Bacik 2008-07-24 807 case Opt_noacl:
1751e8a6cb935e Linus Torvalds 2017-11-27 808 info->sb->s_flags &= ~SB_POSIXACL;
33268eaf0b3db5 Josef Bacik 2008-07-24 809 break;
3a5e14048a0a81 Sage Weil 2009-04-02 810 case Opt_notreelog:
3cdde2240d4533 Jeff Mahoney 2016-06-09 811 btrfs_set_and_info(info, NOTREELOG,
078025347c8ed4 Qu Wenruo 2014-01-13 812 "disabling tree log");
a88998f291fc70 Qu Wenruo 2014-01-06 813 break;
a88998f291fc70 Qu Wenruo 2014-01-06 814 case Opt_treelog:
3cdde2240d4533 Jeff Mahoney 2016-06-09 815 btrfs_clear_and_info(info, NOTREELOG,
078025347c8ed4 Qu Wenruo 2014-01-13 816 "enabling tree log");
3a5e14048a0a81 Sage Weil 2009-04-02 817 break;
fed8f166ebf3af Qu Wenruo 2016-01-19 818 case Opt_norecovery:
96da09192cda57 Qu Wenruo 2016-01-19 819 case Opt_nologreplay:
74ef00185eb864 Qu Wenruo 2020-06-04 820 btrfs_warn(info,
74ef00185eb864 Qu Wenruo 2020-06-04 821 "'nologreplay' is deprecated, use 'rescue=nologreplay' instead");
3cdde2240d4533 Jeff Mahoney 2016-06-09 822 btrfs_set_and_info(info, NOLOGREPLAY,
96da09192cda57 Qu Wenruo 2016-01-19 823 "disabling log replay at mount time");
96da09192cda57 Qu Wenruo 2016-01-19 824 break;
dccae999950896 Sage Weil 2009-04-02 825 case Opt_flushoncommit:
3cdde2240d4533 Jeff Mahoney 2016-06-09 826 btrfs_set_and_info(info, FLUSHONCOMMIT,
078025347c8ed4 Qu Wenruo 2014-01-13 827 "turning on flush-on-commit");
dccae999950896 Sage Weil 2009-04-02 828 break;
2c9ee85671f66c Qu Wenruo 2014-01-06 829 case Opt_noflushoncommit:
3cdde2240d4533 Jeff Mahoney 2016-06-09 830 btrfs_clear_and_info(info, FLUSHONCOMMIT,
078025347c8ed4 Qu Wenruo 2014-01-13 831 "turning off flush-on-commit");
2c9ee85671f66c Qu Wenruo 2014-01-06 832 break;
97e728d4353f38 Josef Bacik 2009-04-21 833 case Opt_ratio:
2c334e87f31783 Wang Shilong 2013-07-24 834 ret = match_int(&args[0], &intarg);
764cb8b43d4d80 Anand Jain 2018-02-13 835 if (ret)
2c334e87f31783 Wang Shilong 2013-07-24 836 goto out;
97e728d4353f38 Josef Bacik 2009-04-21 837 info->metadata_ratio = intarg;
764cb8b43d4d80 Anand Jain 2018-02-13 838 btrfs_info(info, "metadata ratio %u",
97e728d4353f38 Josef Bacik 2009-04-21 839 info->metadata_ratio);
97e728d4353f38 Josef Bacik 2009-04-21 840 break;
e244a0aeb6a599 Christoph Hellwig 2009-10-14 841 case Opt_discard:
b0643e59cfa609 Dennis Zhou 2019-12-13 842 case Opt_discard_mode:
b0643e59cfa609 Dennis Zhou 2019-12-13 843 if (token == Opt_discard ||
b0643e59cfa609 Dennis Zhou 2019-12-13 844 strcmp(args[0].from, "sync") == 0) {
b0643e59cfa609 Dennis Zhou 2019-12-13 845 btrfs_clear_opt(info->mount_opt, DISCARD_ASYNC);
46b27f5059e6ce Dennis Zhou 2019-12-13 846 btrfs_set_and_info(info, DISCARD_SYNC,
46b27f5059e6ce Dennis Zhou 2019-12-13 847 "turning on sync discard");
b0643e59cfa609 Dennis Zhou 2019-12-13 848 } else if (strcmp(args[0].from, "async") == 0) {
b0643e59cfa609 Dennis Zhou 2019-12-13 849 btrfs_clear_opt(info->mount_opt, DISCARD_SYNC);
b0643e59cfa609 Dennis Zhou 2019-12-13 850 btrfs_set_and_info(info, DISCARD_ASYNC,
b0643e59cfa609 Dennis Zhou 2019-12-13 851 "turning on async discard");
b0643e59cfa609 Dennis Zhou 2019-12-13 852 } else {
b0643e59cfa609 Dennis Zhou 2019-12-13 853 ret = -EINVAL;
b0643e59cfa609 Dennis Zhou 2019-12-13 854 goto out;
b0643e59cfa609 Dennis Zhou 2019-12-13 855 }
e244a0aeb6a599 Christoph Hellwig 2009-10-14 856 break;
e07a2ade4426a2 Qu Wenruo 2014-01-06 857 case Opt_nodiscard:
46b27f5059e6ce Dennis Zhou 2019-12-13 858 btrfs_clear_and_info(info, DISCARD_SYNC,
078025347c8ed4 Qu Wenruo 2014-01-13 859 "turning off discard");
b0643e59cfa609 Dennis Zhou 2019-12-13 860 btrfs_clear_and_info(info, DISCARD_ASYNC,
b0643e59cfa609 Dennis Zhou 2019-12-13 861 "turning off async discard");
e07a2ade4426a2 Qu Wenruo 2014-01-06 862 break;
0af3d00bad38d3 Josef Bacik 2010-06-21 863 case Opt_space_cache:
70f6d82ec73c3a Omar Sandoval 2015-09-29 864 case Opt_space_cache_version:
70f6d82ec73c3a Omar Sandoval 2015-09-29 865 if (token == Opt_space_cache ||
70f6d82ec73c3a Omar Sandoval 2015-09-29 866 strcmp(args[0].from, "v1") == 0) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 867 btrfs_clear_opt(info->mount_opt,
70f6d82ec73c3a Omar Sandoval 2015-09-29 868 FREE_SPACE_TREE);
3cdde2240d4533 Jeff Mahoney 2016-06-09 869 btrfs_set_and_info(info, SPACE_CACHE,
078025347c8ed4 Qu Wenruo 2014-01-13 870 "enabling disk space caching");
70f6d82ec73c3a Omar Sandoval 2015-09-29 871 } else if (strcmp(args[0].from, "v2") == 0) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 872 btrfs_clear_opt(info->mount_opt,
70f6d82ec73c3a Omar Sandoval 2015-09-29 873 SPACE_CACHE);
0b246afa62b0cf Jeff Mahoney 2016-06-22 874 btrfs_set_and_info(info, FREE_SPACE_TREE,
70f6d82ec73c3a Omar Sandoval 2015-09-29 875 "enabling free space tree");
70f6d82ec73c3a Omar Sandoval 2015-09-29 876 } else {
70f6d82ec73c3a Omar Sandoval 2015-09-29 877 ret = -EINVAL;
70f6d82ec73c3a Omar Sandoval 2015-09-29 878 goto out;
70f6d82ec73c3a Omar Sandoval 2015-09-29 879 }
0de90876c6cb77 Josef Bacik 2010-11-19 880 break;
f420ee1e923b93 Stefan Behrens 2013-08-15 881 case Opt_rescan_uuid_tree:
f420ee1e923b93 Stefan Behrens 2013-08-15 882 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE);
f420ee1e923b93 Stefan Behrens 2013-08-15 883 break;
73bc187680f94b Josef Bacik 2011-10-03 884 case Opt_no_space_cache:
3cdde2240d4533 Jeff Mahoney 2016-06-09 885 if (btrfs_test_opt(info, SPACE_CACHE)) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 886 btrfs_clear_and_info(info, SPACE_CACHE,
078025347c8ed4 Qu Wenruo 2014-01-13 887 "disabling disk space caching");
70f6d82ec73c3a Omar Sandoval 2015-09-29 888 }
3cdde2240d4533 Jeff Mahoney 2016-06-09 889 if (btrfs_test_opt(info, FREE_SPACE_TREE)) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 890 btrfs_clear_and_info(info, FREE_SPACE_TREE,
70f6d82ec73c3a Omar Sandoval 2015-09-29 891 "disabling free space tree");
70f6d82ec73c3a Omar Sandoval 2015-09-29 892 }
73bc187680f94b Josef Bacik 2011-10-03 893 break;
4b9465cb9e3859 Chris Mason 2011-06-03 894 case Opt_inode_cache:
3818aea2754232 Qu Wenruo 2014-01-13 895 case Opt_noinode_cache:
5297199a8bca12 Nikolay Borisov 2020-11-26 896 btrfs_warn(info,
5297199a8bca12 Nikolay Borisov 2020-11-26 897 "the 'inode_cache' option is deprecated and has no effect since 5.11");
4b9465cb9e3859 Chris Mason 2011-06-03 898 break;
88c2ba3b069f1e Josef Bacik 2010-09-21 899 case Opt_clear_cache:
3cdde2240d4533 Jeff Mahoney 2016-06-09 900 btrfs_set_and_info(info, CLEAR_CACHE,
078025347c8ed4 Qu Wenruo 2014-01-13 901 "force clearing of disk cache");
0af3d00bad38d3 Josef Bacik 2010-06-21 902 break;
4260f7c7516f4c Sage Weil 2010-10-29 903 case Opt_user_subvol_rm_allowed:
4260f7c7516f4c Sage Weil 2010-10-29 904 btrfs_set_opt(info->mount_opt, USER_SUBVOL_RM_ALLOWED);
4260f7c7516f4c Sage Weil 2010-10-29 905 break;
91435650c233b9 Chris Mason 2011-02-16 906 case Opt_enospc_debug:
91435650c233b9 Chris Mason 2011-02-16 907 btrfs_set_opt(info->mount_opt, ENOSPC_DEBUG);
91435650c233b9 Chris Mason 2011-02-16 908 break;
530362934332e4 Qu Wenruo 2014-01-06 909 case Opt_noenospc_debug:
530362934332e4 Qu Wenruo 2014-01-06 910 btrfs_clear_opt(info->mount_opt, ENOSPC_DEBUG);
530362934332e4 Qu Wenruo 2014-01-06 911 break;
4cb5300bc839b8 Chris Mason 2011-05-24 912 case Opt_defrag:
3cdde2240d4533 Jeff Mahoney 2016-06-09 913 btrfs_set_and_info(info, AUTO_DEFRAG,
078025347c8ed4 Qu Wenruo 2014-01-13 914 "enabling auto defrag");
4cb5300bc839b8 Chris Mason 2011-05-24 915 break;
fc0ca9af180b91 Qu Wenruo 2014-01-06 916 case Opt_nodefrag:
3cdde2240d4533 Jeff Mahoney 2016-06-09 917 btrfs_clear_and_info(info, AUTO_DEFRAG,
078025347c8ed4 Qu Wenruo 2014-01-13 918 "disabling auto defrag");
fc0ca9af180b91 Qu Wenruo 2014-01-06 919 break;
af31f5e5b84b5b Chris Mason 2011-11-03 920 case Opt_recovery:
8dcddfa048de63 Qu Wenruo 2016-01-19 921 case Opt_usebackuproot:
74ef00185eb864 Qu Wenruo 2020-06-04 922 btrfs_warn(info,
74ef00185eb864 Qu Wenruo 2020-06-04 923 "'%s' is deprecated, use 'rescue=usebackuproot' instead",
74ef00185eb864 Qu Wenruo 2020-06-04 924 token == Opt_recovery ? "recovery" :
74ef00185eb864 Qu Wenruo 2020-06-04 925 "usebackuproot");
0b246afa62b0cf Jeff Mahoney 2016-06-22 926 btrfs_info(info,
8dcddfa048de63 Qu Wenruo 2016-01-19 927 "trying to use backup root at mount time");
8dcddfa048de63 Qu Wenruo 2016-01-19 928 btrfs_set_opt(info->mount_opt, USEBACKUPROOT);
af31f5e5b84b5b Chris Mason 2011-11-03 929 break;
9555c6c180600b Ilya Dryomov 2012-01-16 930 case Opt_skip_balance:
9555c6c180600b Ilya Dryomov 2012-01-16 931 btrfs_set_opt(info->mount_opt, SKIP_BALANCE);
9555c6c180600b Ilya Dryomov 2012-01-16 932 break;
21adbd5cbb5344 Stefan Behrens 2011-11-09 933 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
21adbd5cbb5344 Stefan Behrens 2011-11-09 934 case Opt_check_integrity_including_extent_data:
0b246afa62b0cf Jeff Mahoney 2016-06-22 935 btrfs_info(info,
efe120a067c867 Frank Holton 2013-12-20 936 "enabling check integrity including extent data");
21adbd5cbb5344 Stefan Behrens 2011-11-09 937 btrfs_set_opt(info->mount_opt,
21adbd5cbb5344 Stefan Behrens 2011-11-09 938 CHECK_INTEGRITY_INCLUDING_EXTENT_DATA);
21adbd5cbb5344 Stefan Behrens 2011-11-09 939 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
21adbd5cbb5344 Stefan Behrens 2011-11-09 940 break;
21adbd5cbb5344 Stefan Behrens 2011-11-09 941 case Opt_check_integrity:
0b246afa62b0cf Jeff Mahoney 2016-06-22 942 btrfs_info(info, "enabling check integrity");
21adbd5cbb5344 Stefan Behrens 2011-11-09 943 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
21adbd5cbb5344 Stefan Behrens 2011-11-09 944 break;
21adbd5cbb5344 Stefan Behrens 2011-11-09 945 case Opt_check_integrity_print_mask:
2c334e87f31783 Wang Shilong 2013-07-24 946 ret = match_int(&args[0], &intarg);
02453bdeb02482 Anand Jain 2018-02-13 947 if (ret)
2c334e87f31783 Wang Shilong 2013-07-24 948 goto out;
21adbd5cbb5344 Stefan Behrens 2011-11-09 949 info->check_integrity_print_mask = intarg;
02453bdeb02482 Anand Jain 2018-02-13 950 btrfs_info(info, "check_integrity_print_mask 0x%x",
21adbd5cbb5344 Stefan Behrens 2011-11-09 951 info->check_integrity_print_mask);
21adbd5cbb5344 Stefan Behrens 2011-11-09 952 break;
21adbd5cbb5344 Stefan Behrens 2011-11-09 953 #else
21adbd5cbb5344 Stefan Behrens 2011-11-09 954 case Opt_check_integrity_including_extent_data:
21adbd5cbb5344 Stefan Behrens 2011-11-09 955 case Opt_check_integrity:
21adbd5cbb5344 Stefan Behrens 2011-11-09 956 case Opt_check_integrity_print_mask:
0b246afa62b0cf Jeff Mahoney 2016-06-22 957 btrfs_err(info,
efe120a067c867 Frank Holton 2013-12-20 958 "support for check_integrity* not compiled in!");
21adbd5cbb5344 Stefan Behrens 2011-11-09 959 ret = -EINVAL;
21adbd5cbb5344 Stefan Behrens 2011-11-09 960 goto out;
21adbd5cbb5344 Stefan Behrens 2011-11-09 961 #endif
8c3429300181be Jeff Mahoney 2011-10-03 962 case Opt_fatal_errors:
8c3429300181be Jeff Mahoney 2011-10-03 963 if (strcmp(args[0].from, "panic") == 0)
8c3429300181be Jeff Mahoney 2011-10-03 964 btrfs_set_opt(info->mount_opt,
8c3429300181be Jeff Mahoney 2011-10-03 965 PANIC_ON_FATAL_ERROR);
8c3429300181be Jeff Mahoney 2011-10-03 966 else if (strcmp(args[0].from, "bug") == 0)
8c3429300181be Jeff Mahoney 2011-10-03 967 btrfs_clear_opt(info->mount_opt,
8c3429300181be Jeff Mahoney 2011-10-03 968 PANIC_ON_FATAL_ERROR);
8c3429300181be Jeff Mahoney 2011-10-03 969 else {
8c3429300181be Jeff Mahoney 2011-10-03 970 ret = -EINVAL;
8c3429300181be Jeff Mahoney 2011-10-03 971 goto out;
8c3429300181be Jeff Mahoney 2011-10-03 972 }
8c3429300181be Jeff Mahoney 2011-10-03 973 break;
8b87dc17fbc744 David Sterba 2013-08-01 974 case Opt_commit_interval:
8b87dc17fbc744 David Sterba 2013-08-01 975 intarg = 0;
8b87dc17fbc744 David Sterba 2013-08-01 976 ret = match_int(&args[0], &intarg);
d3740608646f72 Anand Jain 2018-02-13 977 if (ret)
8b87dc17fbc744 David Sterba 2013-08-01 978 goto out;
d3740608646f72 Anand Jain 2018-02-13 979 if (intarg == 0) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 980 btrfs_info(info,
d3740608646f72 Anand Jain 2018-02-13 981 "using default commit interval %us",
8b87dc17fbc744 David Sterba 2013-08-01 982 BTRFS_DEFAULT_COMMIT_INTERVAL);
d3740608646f72 Anand Jain 2018-02-13 983 intarg = BTRFS_DEFAULT_COMMIT_INTERVAL;
d3740608646f72 Anand Jain 2018-02-13 984 } else if (intarg > 300) {
d3740608646f72 Anand Jain 2018-02-13 985 btrfs_warn(info, "excessive commit interval %d",
d3740608646f72 Anand Jain 2018-02-13 986 intarg);
8b87dc17fbc744 David Sterba 2013-08-01 987 }
d3740608646f72 Anand Jain 2018-02-13 988 info->commit_interval = intarg;
8b87dc17fbc744 David Sterba 2013-08-01 989 break;
74ef00185eb864 Qu Wenruo 2020-06-04 990 case Opt_rescue:
74ef00185eb864 Qu Wenruo 2020-06-04 991 ret = parse_rescue_options(info, args[0].from);
74ef00185eb864 Qu Wenruo 2020-06-04 992 if (ret < 0)
74ef00185eb864 Qu Wenruo 2020-06-04 993 goto out;
74ef00185eb864 Qu Wenruo 2020-06-04 994 break;
d0bd456074dca0 Josef Bacik 2015-09-23 995 #ifdef CONFIG_BTRFS_DEBUG
d0bd456074dca0 Josef Bacik 2015-09-23 996 case Opt_fragment_all:
0b246afa62b0cf Jeff Mahoney 2016-06-22 997 btrfs_info(info, "fragmenting all space");
d0bd456074dca0 Josef Bacik 2015-09-23 998 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
d0bd456074dca0 Josef Bacik 2015-09-23 999 btrfs_set_opt(info->mount_opt, FRAGMENT_METADATA);
d0bd456074dca0 Josef Bacik 2015-09-23 1000 break;
d0bd456074dca0 Josef Bacik 2015-09-23 1001 case Opt_fragment_metadata:
0b246afa62b0cf Jeff Mahoney 2016-06-22 1002 btrfs_info(info, "fragmenting metadata");
d0bd456074dca0 Josef Bacik 2015-09-23 1003 btrfs_set_opt(info->mount_opt,
d0bd456074dca0 Josef Bacik 2015-09-23 1004 FRAGMENT_METADATA);
d0bd456074dca0 Josef Bacik 2015-09-23 1005 break;
d0bd456074dca0 Josef Bacik 2015-09-23 1006 case Opt_fragment_data:
0b246afa62b0cf Jeff Mahoney 2016-06-22 1007 btrfs_info(info, "fragmenting data");
d0bd456074dca0 Josef Bacik 2015-09-23 1008 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
d0bd456074dca0 Josef Bacik 2015-09-23 1009 break;
fb592373cddeb4 Josef Bacik 2017-09-29 1010 #endif
fb592373cddeb4 Josef Bacik 2017-09-29 1011 #ifdef CONFIG_BTRFS_FS_REF_VERIFY
fb592373cddeb4 Josef Bacik 2017-09-29 1012 case Opt_ref_verify:
fb592373cddeb4 Josef Bacik 2017-09-29 1013 btrfs_info(info, "doing ref verification");
fb592373cddeb4 Josef Bacik 2017-09-29 1014 btrfs_set_opt(info->mount_opt, REF_VERIFY);
fb592373cddeb4 Josef Bacik 2017-09-29 1015 break;
d0bd456074dca0 Josef Bacik 2015-09-23 1016 #endif
a7a3f7cadd9bde Sage Weil 2009-11-07 1017 case Opt_err:
7e8f19e50e3ccf David Sterba 2019-11-27 1018 btrfs_err(info, "unrecognized mount option '%s'", p);
a7a3f7cadd9bde Sage Weil 2009-11-07 1019 ret = -EINVAL;
a7a3f7cadd9bde Sage Weil 2009-11-07 1020 goto out;
95e0528919cb0c Chris Mason 2007-08-29 1021 default:
be20aa9dbadc8c Chris Mason 2007-12-17 1022 break;
95e0528919cb0c Chris Mason 2007-08-29 1023 }
95e0528919cb0c Chris Mason 2007-08-29 1024 }
96da09192cda57 Qu Wenruo 2016-01-19 1025 check:
d70bf7484f7287 Josef Bacik 2020-10-16 1026 /* We're read-only, don't have to check. */
d70bf7484f7287 Josef Bacik 2020-10-16 1027 if (new_flags & SB_RDONLY)
d70bf7484f7287 Josef Bacik 2020-10-16 1028 goto out;
d70bf7484f7287 Josef Bacik 2020-10-16 1029
42437a6386ffea Josef Bacik 2020-10-16 1030 if (check_ro_option(info, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") ||
882dbe0cec9651 Josef Bacik 2020-10-16 1031 check_ro_option(info, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots") ||
882dbe0cec9651 Josef Bacik 2020-10-16 1032 check_ro_option(info, BTRFS_MOUNT_IGNOREDATACSUMS, "ignoredatacsums"))
96da09192cda57 Qu Wenruo 2016-01-19 1033 ret = -EINVAL;
a7a3f7cadd9bde Sage Weil 2009-11-07 1034 out:
0b246afa62b0cf Jeff Mahoney 2016-06-22 1035 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) &&
3cdde2240d4533 Jeff Mahoney 2016-06-09 1036 !btrfs_test_opt(info, FREE_SPACE_TREE) &&
3cdde2240d4533 Jeff Mahoney 2016-06-09 1037 !btrfs_test_opt(info, CLEAR_CACHE)) {
0b246afa62b0cf Jeff Mahoney 2016-06-22 1038 btrfs_err(info, "cannot disable free space tree");
70f6d82ec73c3a Omar Sandoval 2015-09-29 1039 ret = -EINVAL;
70f6d82ec73c3a Omar Sandoval 2015-09-29 1040
70f6d82ec73c3a Omar Sandoval 2015-09-29 1041 }
5d1ab66c56fed1 Naohiro Aota 2020-11-10 1042 if (!ret)
5d1ab66c56fed1 Naohiro Aota 2020-11-10 1043 ret = btrfs_check_mountopts_zoned(info);
3cdde2240d4533 Jeff Mahoney 2016-06-09 1044 if (!ret && btrfs_test_opt(info, SPACE_CACHE))
0b246afa62b0cf Jeff Mahoney 2016-06-22 1045 btrfs_info(info, "disk space caching is enabled");
3cdde2240d4533 Jeff Mahoney 2016-06-09 1046 if (!ret && btrfs_test_opt(info, FREE_SPACE_TREE))
0b246afa62b0cf Jeff Mahoney 2016-06-22 1047 btrfs_info(info, "using free space tree");
a7a3f7cadd9bde Sage Weil 2009-11-07 1048 return ret;
edf24abe51493c Christoph Hellwig 2008-06-10 1049 }
edf24abe51493c Christoph Hellwig 2008-06-10 1050
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30107 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-17 23:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 23:57 [kdave-btrfs-devel:dev/auth-hash 158/162] fs/btrfs/super.c:608:29: sparse: sparse: shift too big (32) for type int kernel test robot
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.