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