diff options
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index cb6d13c39bee..802a3113854f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -3019,8 +3019,8 @@ retry_root_backup: | |||
3019 | if (IS_ERR(fs_info->transaction_kthread)) | 3019 | if (IS_ERR(fs_info->transaction_kthread)) |
3020 | goto fail_cleaner; | 3020 | goto fail_cleaner; |
3021 | 3021 | ||
3022 | if (!btrfs_test_opt(tree_root, SSD) && | 3022 | if (!btrfs_test_opt(tree_root->fs_info, SSD) && |
3023 | !btrfs_test_opt(tree_root, NOSSD) && | 3023 | !btrfs_test_opt(tree_root->fs_info, NOSSD) && |
3024 | !fs_info->fs_devices->rotating) { | 3024 | !fs_info->fs_devices->rotating) { |
3025 | btrfs_info(fs_info, "detected SSD devices, enabling SSD mode"); | 3025 | btrfs_info(fs_info, "detected SSD devices, enabling SSD mode"); |
3026 | btrfs_set_opt(fs_info->mount_opt, SSD); | 3026 | btrfs_set_opt(fs_info->mount_opt, SSD); |
@@ -3033,9 +3033,9 @@ retry_root_backup: | |||
3033 | btrfs_apply_pending_changes(fs_info); | 3033 | btrfs_apply_pending_changes(fs_info); |
3034 | 3034 | ||
3035 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY | 3035 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY |
3036 | if (btrfs_test_opt(tree_root, CHECK_INTEGRITY)) { | 3036 | if (btrfs_test_opt(tree_root->fs_info, CHECK_INTEGRITY)) { |
3037 | ret = btrfsic_mount(tree_root, fs_devices, | 3037 | ret = btrfsic_mount(tree_root, fs_devices, |
3038 | btrfs_test_opt(tree_root, | 3038 | btrfs_test_opt(tree_root->fs_info, |
3039 | CHECK_INTEGRITY_INCLUDING_EXTENT_DATA) ? | 3039 | CHECK_INTEGRITY_INCLUDING_EXTENT_DATA) ? |
3040 | 1 : 0, | 3040 | 1 : 0, |
3041 | fs_info->check_integrity_print_mask); | 3041 | fs_info->check_integrity_print_mask); |
@@ -3051,7 +3051,7 @@ retry_root_backup: | |||
3051 | 3051 | ||
3052 | /* do not make disk changes in broken FS or nologreplay is given */ | 3052 | /* do not make disk changes in broken FS or nologreplay is given */ |
3053 | if (btrfs_super_log_root(disk_super) != 0 && | 3053 | if (btrfs_super_log_root(disk_super) != 0 && |
3054 | !btrfs_test_opt(tree_root, NOLOGREPLAY)) { | 3054 | !btrfs_test_opt(tree_root->fs_info, NOLOGREPLAY)) { |
3055 | ret = btrfs_replay_log(fs_info, fs_devices); | 3055 | ret = btrfs_replay_log(fs_info, fs_devices); |
3056 | if (ret) { | 3056 | if (ret) { |
3057 | err = ret; | 3057 | err = ret; |
@@ -3092,7 +3092,7 @@ retry_root_backup: | |||
3092 | if (sb->s_flags & MS_RDONLY) | 3092 | if (sb->s_flags & MS_RDONLY) |
3093 | return 0; | 3093 | return 0; |
3094 | 3094 | ||
3095 | if (btrfs_test_opt(tree_root, FREE_SPACE_TREE) && | 3095 | if (btrfs_test_opt(tree_root->fs_info, FREE_SPACE_TREE) && |
3096 | !btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE)) { | 3096 | !btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE)) { |
3097 | btrfs_info(fs_info, "creating free space tree"); | 3097 | btrfs_info(fs_info, "creating free space tree"); |
3098 | ret = btrfs_create_free_space_tree(fs_info); | 3098 | ret = btrfs_create_free_space_tree(fs_info); |
@@ -3129,7 +3129,7 @@ retry_root_backup: | |||
3129 | 3129 | ||
3130 | btrfs_qgroup_rescan_resume(fs_info); | 3130 | btrfs_qgroup_rescan_resume(fs_info); |
3131 | 3131 | ||
3132 | if (btrfs_test_opt(tree_root, CLEAR_CACHE) && | 3132 | if (btrfs_test_opt(tree_root->fs_info, CLEAR_CACHE) && |
3133 | btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE)) { | 3133 | btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE)) { |
3134 | btrfs_info(fs_info, "clearing free space tree"); | 3134 | btrfs_info(fs_info, "clearing free space tree"); |
3135 | ret = btrfs_clear_free_space_tree(fs_info); | 3135 | ret = btrfs_clear_free_space_tree(fs_info); |
@@ -3150,7 +3150,7 @@ retry_root_backup: | |||
3150 | close_ctree(tree_root); | 3150 | close_ctree(tree_root); |
3151 | return ret; | 3151 | return ret; |
3152 | } | 3152 | } |
3153 | } else if (btrfs_test_opt(tree_root, RESCAN_UUID_TREE) || | 3153 | } else if (btrfs_test_opt(tree_root->fs_info, RESCAN_UUID_TREE) || |
3154 | fs_info->generation != | 3154 | fs_info->generation != |
3155 | btrfs_super_uuid_tree_generation(disk_super)) { | 3155 | btrfs_super_uuid_tree_generation(disk_super)) { |
3156 | btrfs_info(fs_info, "checking UUID tree"); | 3156 | btrfs_info(fs_info, "checking UUID tree"); |
@@ -3227,7 +3227,7 @@ fail: | |||
3227 | return err; | 3227 | return err; |
3228 | 3228 | ||
3229 | recovery_tree_root: | 3229 | recovery_tree_root: |
3230 | if (!btrfs_test_opt(tree_root, USEBACKUPROOT)) | 3230 | if (!btrfs_test_opt(tree_root->fs_info, USEBACKUPROOT)) |
3231 | goto fail_tree_roots; | 3231 | goto fail_tree_roots; |
3232 | 3232 | ||
3233 | free_root_pointers(fs_info, 0); | 3233 | free_root_pointers(fs_info, 0); |
@@ -3642,7 +3642,7 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors) | |||
3642 | int total_errors = 0; | 3642 | int total_errors = 0; |
3643 | u64 flags; | 3643 | u64 flags; |
3644 | 3644 | ||
3645 | do_barriers = !btrfs_test_opt(root, NOBARRIER); | 3645 | do_barriers = !btrfs_test_opt(root->fs_info, NOBARRIER); |
3646 | backup_super_roots(root->fs_info); | 3646 | backup_super_roots(root->fs_info); |
3647 | 3647 | ||
3648 | sb = root->fs_info->super_for_commit; | 3648 | sb = root->fs_info->super_for_commit; |
@@ -3926,7 +3926,7 @@ void close_ctree(struct btrfs_root *root) | |||
3926 | iput(fs_info->btree_inode); | 3926 | iput(fs_info->btree_inode); |
3927 | 3927 | ||
3928 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY | 3928 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY |
3929 | if (btrfs_test_opt(root, CHECK_INTEGRITY)) | 3929 | if (btrfs_test_opt(root->fs_info, CHECK_INTEGRITY)) |
3930 | btrfsic_unmount(root, fs_info->fs_devices); | 3930 | btrfsic_unmount(root, fs_info->fs_devices); |
3931 | #endif | 3931 | #endif |
3932 | 3932 | ||