Lines Matching refs:info

45 #include "space-info.h"
244 static int parse_rescue_options(struct btrfs_fs_info *info, const char *options)
265 btrfs_info(info,
267 btrfs_set_opt(info->mount_opt, USEBACKUPROOT);
270 btrfs_set_and_info(info, NOLOGREPLAY,
274 btrfs_set_and_info(info, IGNOREBADROOTS,
278 btrfs_set_and_info(info, IGNOREDATACSUMS,
282 btrfs_info(info, "enabling all of the rescue options");
283 btrfs_set_and_info(info, IGNOREDATACSUMS,
285 btrfs_set_and_info(info, IGNOREBADROOTS,
287 btrfs_set_and_info(info, NOLOGREPLAY,
291 btrfs_info(info, "unrecognized rescue option '%s'", p);
309 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
322 const bool remounting = test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state);
324 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
325 btrfs_set_opt(info->mount_opt, FREE_SPACE_TREE);
326 else if (btrfs_free_space_cache_v1_active(info)) {
327 if (btrfs_is_zoned(info)) {
328 btrfs_info(info,
330 btrfs_set_super_cache_generation(info->super_copy, 0);
332 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
351 btrfs_info(info, "allowing degraded mounts");
352 btrfs_set_opt(info->mount_opt, DEGRADED);
364 btrfs_set_and_info(info, NODATASUM,
368 if (btrfs_test_opt(info, NODATASUM)) {
369 if (btrfs_test_opt(info, NODATACOW))
370 btrfs_info(info,
373 btrfs_info(info, "setting datasum");
375 btrfs_clear_opt(info->mount_opt, NODATACOW);
376 btrfs_clear_opt(info->mount_opt, NODATASUM);
379 if (!btrfs_test_opt(info, NODATACOW)) {
380 if (!btrfs_test_opt(info, COMPRESS) ||
381 !btrfs_test_opt(info, FORCE_COMPRESS)) {
382 btrfs_info(info,
385 btrfs_info(info, "setting nodatacow");
388 btrfs_clear_opt(info->mount_opt, COMPRESS);
389 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
390 btrfs_set_opt(info->mount_opt, NODATACOW);
391 btrfs_set_opt(info->mount_opt, NODATASUM);
394 btrfs_clear_and_info(info, NODATACOW,
403 saved_compress_type = btrfs_test_opt(info,
405 info->compress_type : BTRFS_COMPRESS_NONE;
407 btrfs_test_opt(info, FORCE_COMPRESS);
408 saved_compress_level = info->compress_level;
414 info->compress_type = BTRFS_COMPRESS_ZLIB;
415 info->compress_level = BTRFS_ZLIB_DEFAULT_LEVEL;
423 info->compress_level =
427 btrfs_set_opt(info->mount_opt, COMPRESS);
428 btrfs_clear_opt(info->mount_opt, NODATACOW);
429 btrfs_clear_opt(info->mount_opt, NODATASUM);
433 info->compress_type = BTRFS_COMPRESS_LZO;
434 info->compress_level = 0;
435 btrfs_set_opt(info->mount_opt, COMPRESS);
436 btrfs_clear_opt(info->mount_opt, NODATACOW);
437 btrfs_clear_opt(info->mount_opt, NODATASUM);
438 btrfs_set_fs_incompat(info, COMPRESS_LZO);
442 info->compress_type = BTRFS_COMPRESS_ZSTD;
443 info->compress_level =
447 btrfs_set_opt(info->mount_opt, COMPRESS);
448 btrfs_clear_opt(info->mount_opt, NODATACOW);
449 btrfs_clear_opt(info->mount_opt, NODATASUM);
450 btrfs_set_fs_incompat(info, COMPRESS_ZSTD);
454 info->compress_level = 0;
455 info->compress_type = 0;
456 btrfs_clear_opt(info->mount_opt, COMPRESS);
457 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
461 btrfs_err(info, "unrecognized compression value %s",
468 btrfs_set_opt(info->mount_opt, FORCE_COMPRESS);
476 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
479 btrfs_info(info, "use no compression");
480 } else if ((info->compress_type != saved_compress_type) ||
482 (info->compress_level != saved_compress_level)) {
483 btrfs_info(info, "%s %s compression, level %d",
485 compress_type, info->compress_level);
490 btrfs_set_and_info(info, SSD,
492 btrfs_clear_opt(info->mount_opt, NOSSD);
495 btrfs_set_and_info(info, SSD,
497 btrfs_set_and_info(info, SSD_SPREAD,
499 btrfs_clear_opt(info->mount_opt, NOSSD);
502 btrfs_set_opt(info->mount_opt, NOSSD);
503 btrfs_clear_and_info(info, SSD,
507 btrfs_clear_and_info(info, SSD_SPREAD,
511 btrfs_clear_and_info(info, NOBARRIER,
515 btrfs_set_and_info(info, NOBARRIER,
521 btrfs_err(info, "unrecognized thread_pool value %s",
525 btrfs_err(info, "invalid value 0 for thread_pool");
529 info->thread_pool_size = intarg;
534 info->max_inline = memparse(num, NULL);
537 if (info->max_inline) {
538 info->max_inline = min_t(u64,
539 info->max_inline,
540 info->sectorsize);
542 btrfs_info(info, "max_inline at %llu",
543 info->max_inline);
551 info->sb->s_flags |= SB_POSIXACL;
554 btrfs_err(info, "support for ACL not compiled in!");
559 info->sb->s_flags &= ~SB_POSIXACL;
562 btrfs_set_and_info(info, NOTREELOG,
566 btrfs_clear_and_info(info, NOTREELOG,
571 btrfs_warn(info,
573 btrfs_set_and_info(info, NOLOGREPLAY,
577 btrfs_set_and_info(info, FLUSHONCOMMIT,
581 btrfs_clear_and_info(info, FLUSHONCOMMIT,
587 btrfs_err(info, "unrecognized metadata_ratio value %s",
591 info->metadata_ratio = intarg;
592 btrfs_info(info, "metadata ratio %u",
593 info->metadata_ratio);
599 btrfs_clear_opt(info->mount_opt, DISCARD_ASYNC);
600 btrfs_set_and_info(info, DISCARD_SYNC,
603 btrfs_clear_opt(info->mount_opt, DISCARD_SYNC);
604 btrfs_set_and_info(info, DISCARD_ASYNC,
607 btrfs_err(info, "unrecognized discard mode value %s",
612 btrfs_clear_opt(info->mount_opt, NODISCARD);
615 btrfs_clear_and_info(info, DISCARD_SYNC,
617 btrfs_clear_and_info(info, DISCARD_ASYNC,
619 btrfs_set_opt(info->mount_opt, NODISCARD);
629 if (btrfs_fs_incompat(info, EXTENT_TREE_V2))
633 btrfs_clear_opt(info->mount_opt,
635 btrfs_set_and_info(info, SPACE_CACHE,
638 btrfs_clear_opt(info->mount_opt,
640 btrfs_set_and_info(info, FREE_SPACE_TREE,
643 btrfs_err(info, "unrecognized space_cache value %s",
650 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE);
657 if (btrfs_fs_incompat(info, EXTENT_TREE_V2))
659 if (btrfs_test_opt(info, SPACE_CACHE)) {
660 btrfs_clear_and_info(info, SPACE_CACHE,
663 if (btrfs_test_opt(info, FREE_SPACE_TREE)) {
664 btrfs_clear_and_info(info, FREE_SPACE_TREE,
670 btrfs_warn(info,
678 if (btrfs_fs_incompat(info, EXTENT_TREE_V2))
680 btrfs_set_and_info(info, CLEAR_CACHE,
684 btrfs_set_opt(info->mount_opt, USER_SUBVOL_RM_ALLOWED);
687 btrfs_set_opt(info->mount_opt, ENOSPC_DEBUG);
690 btrfs_clear_opt(info->mount_opt, ENOSPC_DEBUG);
693 btrfs_set_and_info(info, AUTO_DEFRAG,
697 btrfs_clear_and_info(info, AUTO_DEFRAG,
702 btrfs_warn(info,
706 btrfs_info(info,
708 btrfs_set_opt(info->mount_opt, USEBACKUPROOT);
711 btrfs_set_opt(info->mount_opt, SKIP_BALANCE);
715 btrfs_warn(info,
717 btrfs_info(info,
719 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY_DATA);
720 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
723 btrfs_warn(info,
725 btrfs_info(info, "enabling check integrity");
726 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
731 btrfs_err(info,
736 info->check_integrity_print_mask = intarg;
737 btrfs_warn(info,
739 btrfs_info(info, "check_integrity_print_mask 0x%x",
740 info->check_integrity_print_mask);
746 btrfs_err(info,
753 btrfs_set_opt(info->mount_opt,
756 btrfs_clear_opt(info->mount_opt,
759 btrfs_err(info, "unrecognized fatal_errors value %s",
769 btrfs_err(info, "unrecognized commit_interval value %s",
775 btrfs_info(info,
780 btrfs_warn(info, "excessive commit interval %d",
783 info->commit_interval = intarg;
786 ret = parse_rescue_options(info, args[0].from);
788 btrfs_err(info, "unrecognized rescue value %s",
795 btrfs_info(info, "fragmenting all space");
796 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
797 btrfs_set_opt(info->mount_opt, FRAGMENT_METADATA);
800 btrfs_info(info, "fragmenting metadata");
801 btrfs_set_opt(info->mount_opt,
805 btrfs_info(info, "fragmenting data");
806 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
811 btrfs_info(info, "doing ref verification");
812 btrfs_set_opt(info->mount_opt, REF_VERIFY);
816 btrfs_err(info, "unrecognized mount option '%s'", p);
828 if (check_ro_option(info, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") ||
829 check_ro_option(info, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots") ||
830 check_ro_option(info, BTRFS_MOUNT_IGNOREDATACSUMS, "ignoredatacsums"))
833 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) &&
834 !btrfs_test_opt(info, FREE_SPACE_TREE) &&
835 !btrfs_test_opt(info, CLEAR_CACHE)) {
836 btrfs_err(info, "cannot disable free space tree");
839 if (btrfs_fs_compat_ro(info, BLOCK_GROUP_TREE) &&
840 !btrfs_test_opt(info, FREE_SPACE_TREE)) {
841 btrfs_err(info, "cannot disable free space tree with block-group-tree feature");
845 ret = btrfs_check_mountopts_zoned(info);
847 if (btrfs_test_opt(info, SPACE_CACHE))
848 btrfs_info(info, "disk space caching is enabled");
849 if (btrfs_test_opt(info, FREE_SPACE_TREE))
850 btrfs_info(info, "using free space tree");
1242 struct btrfs_fs_info *info = btrfs_sb(dentry->d_sb);
1247 if (btrfs_test_opt(info, DEGRADED))
1249 if (btrfs_test_opt(info, NODATASUM))
1251 if (btrfs_test_opt(info, NODATACOW))
1253 if (btrfs_test_opt(info, NOBARRIER))
1255 if (info->max_inline != BTRFS_DEFAULT_MAX_INLINE)
1256 seq_printf(seq, ",max_inline=%llu", info->max_inline);
1257 if (info->thread_pool_size != min_t(unsigned long,
1259 seq_printf(seq, ",thread_pool=%u", info->thread_pool_size);
1260 if (btrfs_test_opt(info, COMPRESS)) {
1261 compress_type = btrfs_compress_type2str(info->compress_type);
1262 if (btrfs_test_opt(info, FORCE_COMPRESS))
1266 if (info->compress_level)
1267 seq_printf(seq, ":%d", info->compress_level);
1269 if (btrfs_test_opt(info, NOSSD))
1271 if (btrfs_test_opt(info, SSD_SPREAD))
1273 else if (btrfs_test_opt(info, SSD))
1275 if (btrfs_test_opt(info, NOTREELOG))
1277 if (btrfs_test_opt(info, NOLOGREPLAY))
1279 if (btrfs_test_opt(info, USEBACKUPROOT))
1281 if (btrfs_test_opt(info, IGNOREBADROOTS))
1283 if (btrfs_test_opt(info, IGNOREDATACSUMS))
1285 if (btrfs_test_opt(info, FLUSHONCOMMIT))
1287 if (btrfs_test_opt(info, DISCARD_SYNC))
1289 if (btrfs_test_opt(info, DISCARD_ASYNC))
1291 if (!(info->sb->s_flags & SB_POSIXACL))
1293 if (btrfs_free_space_cache_v1_active(info))
1295 else if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
1299 if (btrfs_test_opt(info, RESCAN_UUID_TREE))
1301 if (btrfs_test_opt(info, CLEAR_CACHE))
1303 if (btrfs_test_opt(info, USER_SUBVOL_RM_ALLOWED))
1305 if (btrfs_test_opt(info, ENOSPC_DEBUG))
1307 if (btrfs_test_opt(info, AUTO_DEFRAG))
1309 if (btrfs_test_opt(info, SKIP_BALANCE))
1312 if (btrfs_test_opt(info, CHECK_INTEGRITY_DATA))
1314 else if (btrfs_test_opt(info, CHECK_INTEGRITY))
1316 if (info->check_integrity_print_mask)
1318 info->check_integrity_print_mask);
1320 if (info->metadata_ratio)
1321 seq_printf(seq, ",metadata_ratio=%u", info->metadata_ratio);
1322 if (btrfs_test_opt(info, PANIC_ON_FATAL_ERROR))
1324 if (info->commit_interval != BTRFS_DEFAULT_COMMIT_INTERVAL)
1325 seq_printf(seq, ",commit=%u", info->commit_interval);
1327 if (btrfs_test_opt(info, FRAGMENT_DATA))
1329 if (btrfs_test_opt(info, FRAGMENT_METADATA))
1332 if (btrfs_test_opt(info, REF_VERIFY))
1336 subvol_name = btrfs_get_subvol_name_from_objectid(info,