btrfs: publish per-super attributes in sysfs
[deliverable/linux.git] / fs / btrfs / disk-io.c
index 435ef132b80020b5626a3e0803b4e864c687bff7..81f3433fe4fdc50abc3f3270d9f40907d73a8097 100644 (file)
@@ -48,6 +48,7 @@
 #include "rcu-string.h"
 #include "dev-replace.h"
 #include "raid56.h"
+#include "sysfs.h"
 
 #ifdef CONFIG_X86
 #include <asm/cpufeature.h>
@@ -2743,6 +2744,12 @@ retry_root_backup:
 
        btrfs_close_extra_devices(fs_info, fs_devices, 1);
 
+       ret = btrfs_sysfs_add_one(fs_info);
+       if (ret) {
+               pr_err("btrfs: failed to init sysfs interface: %d\n", ret);
+               goto fail_block_groups;
+       }
+
        ret = btrfs_init_space_info(fs_info);
        if (ret) {
                printk(KERN_ERR "Failed to initial space info: %d\n", ret);
@@ -3584,6 +3591,8 @@ int close_ctree(struct btrfs_root *root)
                       percpu_counter_sum(&fs_info->delalloc_bytes));
        }
 
+       btrfs_sysfs_remove_one(fs_info);
+
        del_fs_roots(fs_info);
 
        btrfs_free_block_groups(fs_info);
This page took 0.024306 seconds and 5 git commands to generate.