Lines Matching refs:info
499 static int parse_rescue_options(struct btrfs_fs_info *info, const char *options) in parse_rescue_options() argument
520 btrfs_info(info, in parse_rescue_options()
522 btrfs_set_opt(info->mount_opt, USEBACKUPROOT); in parse_rescue_options()
525 btrfs_set_and_info(info, NOLOGREPLAY, in parse_rescue_options()
529 btrfs_set_and_info(info, IGNOREBADROOTS, in parse_rescue_options()
533 btrfs_set_and_info(info, IGNOREDATACSUMS, in parse_rescue_options()
537 btrfs_info(info, "enabling all of the rescue options"); in parse_rescue_options()
538 btrfs_set_and_info(info, IGNOREDATACSUMS, in parse_rescue_options()
540 btrfs_set_and_info(info, IGNOREBADROOTS, in parse_rescue_options()
542 btrfs_set_and_info(info, NOLOGREPLAY, in parse_rescue_options()
546 btrfs_info(info, "unrecognized rescue option '%s'", p); in parse_rescue_options()
564 int btrfs_parse_options(struct btrfs_fs_info *info, char *options, in btrfs_parse_options() argument
577 const bool remounting = test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state); in btrfs_parse_options()
579 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE)) in btrfs_parse_options()
580 btrfs_set_opt(info->mount_opt, FREE_SPACE_TREE); in btrfs_parse_options()
581 else if (btrfs_free_space_cache_v1_active(info)) { in btrfs_parse_options()
582 if (btrfs_is_zoned(info)) { in btrfs_parse_options()
583 btrfs_info(info, in btrfs_parse_options()
585 btrfs_set_super_cache_generation(info->super_copy, 0); in btrfs_parse_options()
587 btrfs_set_opt(info->mount_opt, SPACE_CACHE); in btrfs_parse_options()
606 btrfs_info(info, "allowing degraded mounts"); in btrfs_parse_options()
607 btrfs_set_opt(info->mount_opt, DEGRADED); in btrfs_parse_options()
619 btrfs_set_and_info(info, NODATASUM, in btrfs_parse_options()
623 if (btrfs_test_opt(info, NODATASUM)) { in btrfs_parse_options()
624 if (btrfs_test_opt(info, NODATACOW)) in btrfs_parse_options()
625 btrfs_info(info, in btrfs_parse_options()
628 btrfs_info(info, "setting datasum"); in btrfs_parse_options()
630 btrfs_clear_opt(info->mount_opt, NODATACOW); in btrfs_parse_options()
631 btrfs_clear_opt(info->mount_opt, NODATASUM); in btrfs_parse_options()
634 if (!btrfs_test_opt(info, NODATACOW)) { in btrfs_parse_options()
635 if (!btrfs_test_opt(info, COMPRESS) || in btrfs_parse_options()
636 !btrfs_test_opt(info, FORCE_COMPRESS)) { in btrfs_parse_options()
637 btrfs_info(info, in btrfs_parse_options()
640 btrfs_info(info, "setting nodatacow"); in btrfs_parse_options()
643 btrfs_clear_opt(info->mount_opt, COMPRESS); in btrfs_parse_options()
644 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS); in btrfs_parse_options()
645 btrfs_set_opt(info->mount_opt, NODATACOW); in btrfs_parse_options()
646 btrfs_set_opt(info->mount_opt, NODATASUM); in btrfs_parse_options()
649 btrfs_clear_and_info(info, NODATACOW, in btrfs_parse_options()
658 saved_compress_type = btrfs_test_opt(info, in btrfs_parse_options()
660 info->compress_type : BTRFS_COMPRESS_NONE; in btrfs_parse_options()
662 btrfs_test_opt(info, FORCE_COMPRESS); in btrfs_parse_options()
663 saved_compress_level = info->compress_level; in btrfs_parse_options()
669 info->compress_type = BTRFS_COMPRESS_ZLIB; in btrfs_parse_options()
670 info->compress_level = BTRFS_ZLIB_DEFAULT_LEVEL; in btrfs_parse_options()
678 info->compress_level = in btrfs_parse_options()
682 btrfs_set_opt(info->mount_opt, COMPRESS); in btrfs_parse_options()
683 btrfs_clear_opt(info->mount_opt, NODATACOW); in btrfs_parse_options()
684 btrfs_clear_opt(info->mount_opt, NODATASUM); in btrfs_parse_options()
688 info->compress_type = BTRFS_COMPRESS_LZO; in btrfs_parse_options()
689 info->compress_level = 0; in btrfs_parse_options()
690 btrfs_set_opt(info->mount_opt, COMPRESS); in btrfs_parse_options()
691 btrfs_clear_opt(info->mount_opt, NODATACOW); in btrfs_parse_options()
692 btrfs_clear_opt(info->mount_opt, NODATASUM); in btrfs_parse_options()
693 btrfs_set_fs_incompat(info, COMPRESS_LZO); in btrfs_parse_options()
697 info->compress_type = BTRFS_COMPRESS_ZSTD; in btrfs_parse_options()
698 info->compress_level = in btrfs_parse_options()
702 btrfs_set_opt(info->mount_opt, COMPRESS); in btrfs_parse_options()
703 btrfs_clear_opt(info->mount_opt, NODATACOW); in btrfs_parse_options()
704 btrfs_clear_opt(info->mount_opt, NODATASUM); in btrfs_parse_options()
705 btrfs_set_fs_incompat(info, COMPRESS_ZSTD); in btrfs_parse_options()
709 info->compress_level = 0; in btrfs_parse_options()
710 info->compress_type = 0; in btrfs_parse_options()
711 btrfs_clear_opt(info->mount_opt, COMPRESS); in btrfs_parse_options()
712 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS); in btrfs_parse_options()
716 btrfs_err(info, "unrecognized compression value %s", in btrfs_parse_options()
723 btrfs_set_opt(info->mount_opt, FORCE_COMPRESS); in btrfs_parse_options()
731 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS); in btrfs_parse_options()
734 btrfs_info(info, "use no compression"); in btrfs_parse_options()
735 } else if ((info->compress_type != saved_compress_type) || in btrfs_parse_options()
737 (info->compress_level != saved_compress_level)) { in btrfs_parse_options()
738 btrfs_info(info, "%s %s compression, level %d", in btrfs_parse_options()
740 compress_type, info->compress_level); in btrfs_parse_options()
745 btrfs_set_and_info(info, SSD, in btrfs_parse_options()
747 btrfs_clear_opt(info->mount_opt, NOSSD); in btrfs_parse_options()
750 btrfs_set_and_info(info, SSD, in btrfs_parse_options()
752 btrfs_set_and_info(info, SSD_SPREAD, in btrfs_parse_options()
754 btrfs_clear_opt(info->mount_opt, NOSSD); in btrfs_parse_options()
757 btrfs_set_opt(info->mount_opt, NOSSD); in btrfs_parse_options()
758 btrfs_clear_and_info(info, SSD, in btrfs_parse_options()
762 btrfs_clear_and_info(info, SSD_SPREAD, in btrfs_parse_options()
766 btrfs_clear_and_info(info, NOBARRIER, in btrfs_parse_options()
770 btrfs_set_and_info(info, NOBARRIER, in btrfs_parse_options()
776 btrfs_err(info, "unrecognized thread_pool value %s", in btrfs_parse_options()
780 btrfs_err(info, "invalid value 0 for thread_pool"); in btrfs_parse_options()
784 info->thread_pool_size = intarg; in btrfs_parse_options()
789 info->max_inline = memparse(num, NULL); in btrfs_parse_options()
792 if (info->max_inline) { in btrfs_parse_options()
793 info->max_inline = min_t(u64, in btrfs_parse_options()
794 info->max_inline, in btrfs_parse_options()
795 info->sectorsize); in btrfs_parse_options()
797 btrfs_info(info, "max_inline at %llu", in btrfs_parse_options()
798 info->max_inline); in btrfs_parse_options()
806 info->sb->s_flags |= SB_POSIXACL; in btrfs_parse_options()
809 btrfs_err(info, "support for ACL not compiled in!"); in btrfs_parse_options()
814 info->sb->s_flags &= ~SB_POSIXACL; in btrfs_parse_options()
817 btrfs_set_and_info(info, NOTREELOG, in btrfs_parse_options()
821 btrfs_clear_and_info(info, NOTREELOG, in btrfs_parse_options()
826 btrfs_warn(info, in btrfs_parse_options()
828 btrfs_set_and_info(info, NOLOGREPLAY, in btrfs_parse_options()
832 btrfs_set_and_info(info, FLUSHONCOMMIT, in btrfs_parse_options()
836 btrfs_clear_and_info(info, FLUSHONCOMMIT, in btrfs_parse_options()
842 btrfs_err(info, "unrecognized metadata_ratio value %s", in btrfs_parse_options()
846 info->metadata_ratio = intarg; in btrfs_parse_options()
847 btrfs_info(info, "metadata ratio %u", in btrfs_parse_options()
848 info->metadata_ratio); in btrfs_parse_options()
854 btrfs_clear_opt(info->mount_opt, DISCARD_ASYNC); in btrfs_parse_options()
855 btrfs_set_and_info(info, DISCARD_SYNC, in btrfs_parse_options()
858 btrfs_clear_opt(info->mount_opt, DISCARD_SYNC); in btrfs_parse_options()
859 btrfs_set_and_info(info, DISCARD_ASYNC, in btrfs_parse_options()
862 btrfs_err(info, "unrecognized discard mode value %s", in btrfs_parse_options()
869 btrfs_clear_and_info(info, DISCARD_SYNC, in btrfs_parse_options()
871 btrfs_clear_and_info(info, DISCARD_ASYNC, in btrfs_parse_options()
878 btrfs_clear_opt(info->mount_opt, in btrfs_parse_options()
880 btrfs_set_and_info(info, SPACE_CACHE, in btrfs_parse_options()
883 btrfs_clear_opt(info->mount_opt, in btrfs_parse_options()
885 btrfs_set_and_info(info, FREE_SPACE_TREE, in btrfs_parse_options()
888 btrfs_err(info, "unrecognized space_cache value %s", in btrfs_parse_options()
895 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE); in btrfs_parse_options()
898 if (btrfs_test_opt(info, SPACE_CACHE)) { in btrfs_parse_options()
899 btrfs_clear_and_info(info, SPACE_CACHE, in btrfs_parse_options()
902 if (btrfs_test_opt(info, FREE_SPACE_TREE)) { in btrfs_parse_options()
903 btrfs_clear_and_info(info, FREE_SPACE_TREE, in btrfs_parse_options()
909 btrfs_warn(info, in btrfs_parse_options()
913 btrfs_set_and_info(info, CLEAR_CACHE, in btrfs_parse_options()
917 btrfs_set_opt(info->mount_opt, USER_SUBVOL_RM_ALLOWED); in btrfs_parse_options()
920 btrfs_set_opt(info->mount_opt, ENOSPC_DEBUG); in btrfs_parse_options()
923 btrfs_clear_opt(info->mount_opt, ENOSPC_DEBUG); in btrfs_parse_options()
926 btrfs_set_and_info(info, AUTO_DEFRAG, in btrfs_parse_options()
930 btrfs_clear_and_info(info, AUTO_DEFRAG, in btrfs_parse_options()
935 btrfs_warn(info, in btrfs_parse_options()
939 btrfs_info(info, in btrfs_parse_options()
941 btrfs_set_opt(info->mount_opt, USEBACKUPROOT); in btrfs_parse_options()
944 btrfs_set_opt(info->mount_opt, SKIP_BALANCE); in btrfs_parse_options()
948 btrfs_info(info, in btrfs_parse_options()
950 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY_DATA); in btrfs_parse_options()
951 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY); in btrfs_parse_options()
954 btrfs_info(info, "enabling check integrity"); in btrfs_parse_options()
955 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY); in btrfs_parse_options()
960 btrfs_err(info, in btrfs_parse_options()
965 info->check_integrity_print_mask = intarg; in btrfs_parse_options()
966 btrfs_info(info, "check_integrity_print_mask 0x%x", in btrfs_parse_options()
967 info->check_integrity_print_mask); in btrfs_parse_options()
973 btrfs_err(info, in btrfs_parse_options()
980 btrfs_set_opt(info->mount_opt, in btrfs_parse_options()
983 btrfs_clear_opt(info->mount_opt, in btrfs_parse_options()
986 btrfs_err(info, "unrecognized fatal_errors value %s", in btrfs_parse_options()
996 btrfs_err(info, "unrecognized commit_interval value %s", in btrfs_parse_options()
1002 btrfs_info(info, in btrfs_parse_options()
1007 btrfs_warn(info, "excessive commit interval %d", in btrfs_parse_options()
1010 info->commit_interval = intarg; in btrfs_parse_options()
1013 ret = parse_rescue_options(info, args[0].from); in btrfs_parse_options()
1015 btrfs_err(info, "unrecognized rescue value %s", in btrfs_parse_options()
1022 btrfs_info(info, "fragmenting all space"); in btrfs_parse_options()
1023 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA); in btrfs_parse_options()
1024 btrfs_set_opt(info->mount_opt, FRAGMENT_METADATA); in btrfs_parse_options()
1027 btrfs_info(info, "fragmenting metadata"); in btrfs_parse_options()
1028 btrfs_set_opt(info->mount_opt, in btrfs_parse_options()
1032 btrfs_info(info, "fragmenting data"); in btrfs_parse_options()
1033 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA); in btrfs_parse_options()
1038 btrfs_info(info, "doing ref verification"); in btrfs_parse_options()
1039 btrfs_set_opt(info->mount_opt, REF_VERIFY); in btrfs_parse_options()
1043 btrfs_err(info, "unrecognized mount option '%s'", p); in btrfs_parse_options()
1055 if (check_ro_option(info, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") || in btrfs_parse_options()
1056 check_ro_option(info, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots") || in btrfs_parse_options()
1057 check_ro_option(info, BTRFS_MOUNT_IGNOREDATACSUMS, "ignoredatacsums")) in btrfs_parse_options()
1060 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) && in btrfs_parse_options()
1061 !btrfs_test_opt(info, FREE_SPACE_TREE) && in btrfs_parse_options()
1062 !btrfs_test_opt(info, CLEAR_CACHE)) { in btrfs_parse_options()
1063 btrfs_err(info, "cannot disable free space tree"); in btrfs_parse_options()
1068 ret = btrfs_check_mountopts_zoned(info); in btrfs_parse_options()
1070 if (btrfs_test_opt(info, SPACE_CACHE)) in btrfs_parse_options()
1071 btrfs_info(info, "disk space caching is enabled"); in btrfs_parse_options()
1072 if (btrfs_test_opt(info, FREE_SPACE_TREE)) in btrfs_parse_options()
1073 btrfs_info(info, "using free space tree"); in btrfs_parse_options()
1465 struct btrfs_fs_info *info = btrfs_sb(dentry->d_sb); in btrfs_show_options() local
1470 if (btrfs_test_opt(info, DEGRADED)) in btrfs_show_options()
1472 if (btrfs_test_opt(info, NODATASUM)) in btrfs_show_options()
1474 if (btrfs_test_opt(info, NODATACOW)) in btrfs_show_options()
1476 if (btrfs_test_opt(info, NOBARRIER)) in btrfs_show_options()
1478 if (info->max_inline != BTRFS_DEFAULT_MAX_INLINE) in btrfs_show_options()
1479 seq_printf(seq, ",max_inline=%llu", info->max_inline); in btrfs_show_options()
1480 if (info->thread_pool_size != min_t(unsigned long, in btrfs_show_options()
1482 seq_printf(seq, ",thread_pool=%u", info->thread_pool_size); in btrfs_show_options()
1483 if (btrfs_test_opt(info, COMPRESS)) { in btrfs_show_options()
1484 compress_type = btrfs_compress_type2str(info->compress_type); in btrfs_show_options()
1485 if (btrfs_test_opt(info, FORCE_COMPRESS)) in btrfs_show_options()
1489 if (info->compress_level) in btrfs_show_options()
1490 seq_printf(seq, ":%d", info->compress_level); in btrfs_show_options()
1492 if (btrfs_test_opt(info, NOSSD)) in btrfs_show_options()
1494 if (btrfs_test_opt(info, SSD_SPREAD)) in btrfs_show_options()
1496 else if (btrfs_test_opt(info, SSD)) in btrfs_show_options()
1498 if (btrfs_test_opt(info, NOTREELOG)) in btrfs_show_options()
1500 if (btrfs_test_opt(info, NOLOGREPLAY)) in btrfs_show_options()
1502 if (btrfs_test_opt(info, USEBACKUPROOT)) in btrfs_show_options()
1504 if (btrfs_test_opt(info, IGNOREBADROOTS)) in btrfs_show_options()
1506 if (btrfs_test_opt(info, IGNOREDATACSUMS)) in btrfs_show_options()
1508 if (btrfs_test_opt(info, FLUSHONCOMMIT)) in btrfs_show_options()
1510 if (btrfs_test_opt(info, DISCARD_SYNC)) in btrfs_show_options()
1512 if (btrfs_test_opt(info, DISCARD_ASYNC)) in btrfs_show_options()
1514 if (!(info->sb->s_flags & SB_POSIXACL)) in btrfs_show_options()
1516 if (btrfs_free_space_cache_v1_active(info)) in btrfs_show_options()
1518 else if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE)) in btrfs_show_options()
1522 if (btrfs_test_opt(info, RESCAN_UUID_TREE)) in btrfs_show_options()
1524 if (btrfs_test_opt(info, CLEAR_CACHE)) in btrfs_show_options()
1526 if (btrfs_test_opt(info, USER_SUBVOL_RM_ALLOWED)) in btrfs_show_options()
1528 if (btrfs_test_opt(info, ENOSPC_DEBUG)) in btrfs_show_options()
1530 if (btrfs_test_opt(info, AUTO_DEFRAG)) in btrfs_show_options()
1532 if (btrfs_test_opt(info, SKIP_BALANCE)) in btrfs_show_options()
1535 if (btrfs_test_opt(info, CHECK_INTEGRITY_DATA)) in btrfs_show_options()
1537 else if (btrfs_test_opt(info, CHECK_INTEGRITY)) in btrfs_show_options()
1539 if (info->check_integrity_print_mask) in btrfs_show_options()
1541 info->check_integrity_print_mask); in btrfs_show_options()
1543 if (info->metadata_ratio) in btrfs_show_options()
1544 seq_printf(seq, ",metadata_ratio=%u", info->metadata_ratio); in btrfs_show_options()
1545 if (btrfs_test_opt(info, PANIC_ON_FATAL_ERROR)) in btrfs_show_options()
1547 if (info->commit_interval != BTRFS_DEFAULT_COMMIT_INTERVAL) in btrfs_show_options()
1548 seq_printf(seq, ",commit=%u", info->commit_interval); in btrfs_show_options()
1550 if (btrfs_test_opt(info, FRAGMENT_DATA)) in btrfs_show_options()
1552 if (btrfs_test_opt(info, FRAGMENT_METADATA)) in btrfs_show_options()
1555 if (btrfs_test_opt(info, REF_VERIFY)) in btrfs_show_options()
1559 subvol_name = btrfs_get_subvol_name_from_objectid(info, in btrfs_show_options()