diff options
author | Jeff Mahoney <jeffm@suse.com> | 2013-11-01 13:06:58 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 16:19:25 -0500 |
commit | 5ac1d209f11271fbfad0fa31ba56ec64c142d9ea (patch) | |
tree | 15f67ec6c85caa87b3358df2876f51becdf04b49 /fs/btrfs/disk-io.c | |
parent | 079b72bca30dbc74c86c7c7825b8c34eb86ce3ee (diff) |
btrfs: publish per-super attributes in sysfs
This patch adds per-super attributes to sysfs.
It doesn't publish any attributes yet, but does the proper lifetime
handling as well as the basic infrastructure to add new attributes.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 435ef132b800..81f3433fe4fd 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "rcu-string.h" | 48 | #include "rcu-string.h" |
49 | #include "dev-replace.h" | 49 | #include "dev-replace.h" |
50 | #include "raid56.h" | 50 | #include "raid56.h" |
51 | #include "sysfs.h" | ||
51 | 52 | ||
52 | #ifdef CONFIG_X86 | 53 | #ifdef CONFIG_X86 |
53 | #include <asm/cpufeature.h> | 54 | #include <asm/cpufeature.h> |
@@ -2743,6 +2744,12 @@ retry_root_backup: | |||
2743 | 2744 | ||
2744 | btrfs_close_extra_devices(fs_info, fs_devices, 1); | 2745 | btrfs_close_extra_devices(fs_info, fs_devices, 1); |
2745 | 2746 | ||
2747 | ret = btrfs_sysfs_add_one(fs_info); | ||
2748 | if (ret) { | ||
2749 | pr_err("btrfs: failed to init sysfs interface: %d\n", ret); | ||
2750 | goto fail_block_groups; | ||
2751 | } | ||
2752 | |||
2746 | ret = btrfs_init_space_info(fs_info); | 2753 | ret = btrfs_init_space_info(fs_info); |
2747 | if (ret) { | 2754 | if (ret) { |
2748 | printk(KERN_ERR "Failed to initial space info: %d\n", ret); | 2755 | printk(KERN_ERR "Failed to initial space info: %d\n", ret); |
@@ -3584,6 +3591,8 @@ int close_ctree(struct btrfs_root *root) | |||
3584 | percpu_counter_sum(&fs_info->delalloc_bytes)); | 3591 | percpu_counter_sum(&fs_info->delalloc_bytes)); |
3585 | } | 3592 | } |
3586 | 3593 | ||
3594 | btrfs_sysfs_remove_one(fs_info); | ||
3595 | |||
3587 | del_fs_roots(fs_info); | 3596 | del_fs_roots(fs_info); |
3588 | 3597 | ||
3589 | btrfs_free_block_groups(fs_info); | 3598 | btrfs_free_block_groups(fs_info); |