]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Revert "btrfs: synchronize incompat feature bits with sysfs files"
authorChris Mason <clm@fb.com>
Fri, 29 Jan 2016 16:19:37 +0000 (08:19 -0800)
committerChris Mason <clm@fb.com>
Fri, 29 Jan 2016 16:19:37 +0000 (08:19 -0800)
This reverts commit 14e46e04958df740c6c6a94849f176159a333f13.

This ends up doing sysfs operations from deep in balance (where we
should be GFP_NOFS) and under heavy balance load, we're making races
against sysfs internals.

Revert it for now while we figure things out.

Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/free-space-tree.c
fs/btrfs/ioctl.c
fs/btrfs/super.c
fs/btrfs/volumes.c

index 81a053d2966bb9c55080c23ab4ffc4064cd74131..53dbeaf6ce941cc7a6a8bf06c6a81df354e9e364 100644 (file)
@@ -23,7 +23,6 @@
 #include "locking.h"
 #include "free-space-tree.h"
 #include "transaction.h"
-#include "sysfs.h"
 
 static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
                                        struct btrfs_fs_info *fs_info,
@@ -1184,9 +1183,6 @@ int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info)
        }
 
        btrfs_set_fs_compat_ro(fs_info, FREE_SPACE_TREE);
-       btrfs_sysfs_feature_update(fs_info,
-               BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE, FEAT_COMPAT_RO);
-
        fs_info->creating_free_space_tree = 0;
 
        ret = btrfs_commit_transaction(trans, tree_root);
@@ -1255,9 +1251,6 @@ int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info)
                return PTR_ERR(trans);
 
        btrfs_clear_fs_compat_ro(fs_info, FREE_SPACE_TREE);
-       btrfs_sysfs_feature_update(fs_info,
-               BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE, FEAT_COMPAT_RO);
-
        fs_info->free_space_root = NULL;
 
        ret = clear_free_space_tree(trans, free_space_root);
index 1568f57a3376be3736174dbe184f95fef03ea3db..83c9ad3f2621ea74a4b7764fdac29c81ec738744 100644 (file)
@@ -1459,8 +1459,6 @@ int btrfs_defrag_file(struct inode *inode, struct file *file,
 
        if (range->compress_type == BTRFS_COMPRESS_LZO) {
                btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZO);
-               btrfs_sysfs_feature_update(root->fs_info,
-                       BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO, FEAT_INCOMPAT);
        }
 
        ret = defrag_count;
@@ -4069,8 +4067,6 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
        btrfs_free_path(path);
 
        btrfs_set_fs_incompat(root->fs_info, DEFAULT_SUBVOL);
-       btrfs_sysfs_feature_update(root->fs_info,
-               BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL, FEAT_INCOMPAT);
        btrfs_end_transaction(trans, root);
 out:
        mnt_drop_write_file(file);
index 49b424103c321782484c0a8123ca70557df716a4..a8e049ae933dc0eea7bba35f7a2d598029a4f94a 100644 (file)
@@ -58,7 +58,6 @@
 #include "dev-replace.h"
 #include "free-space-cache.h"
 #include "backref.h"
-#include "sysfs.h"
 #include "tests/btrfs-tests.h"
 
 #include "qgroup.h"
@@ -486,9 +485,6 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
                                btrfs_clear_opt(info->mount_opt, NODATACOW);
                                btrfs_clear_opt(info->mount_opt, NODATASUM);
                                btrfs_set_fs_incompat(info, COMPRESS_LZO);
-                               btrfs_sysfs_feature_update(root->fs_info,
-                                       BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO,
-                                       FEAT_INCOMPAT);
                                no_compress = 0;
                        } else if (strncmp(args[0].from, "no", 2) == 0) {
                                compress_type = "no";
index 5b505f61929e3141b799f9798a79eaba9b18466e..366b335946fae763e380ed884792df5efe07a2c9 100644 (file)
@@ -4469,8 +4469,6 @@ static void check_raid56_incompat_flag(struct btrfs_fs_info *info, u64 type)
                return;
 
        btrfs_set_fs_incompat(info, RAID56);
-       btrfs_sysfs_feature_update(info, BTRFS_FEATURE_INCOMPAT_RAID56,
-               FEAT_INCOMPAT);
 }
 
 #define BTRFS_MAX_DEVS(r) ((BTRFS_LEAF_DATA_SIZE(r)            \