0001
0002
0003 #ifndef BTRFS_SYSFS_H
0004 #define BTRFS_SYSFS_H
0005
0006 #include <linux/kobject.h>
0007
0008 enum btrfs_feature_set {
0009 FEAT_COMPAT,
0010 FEAT_COMPAT_RO,
0011 FEAT_INCOMPAT,
0012 FEAT_MAX
0013 };
0014
0015 char *btrfs_printable_features(enum btrfs_feature_set set, u64 flags);
0016 const char *btrfs_feature_set_name(enum btrfs_feature_set set);
0017 int btrfs_sysfs_add_device(struct btrfs_device *device);
0018 void btrfs_sysfs_remove_device(struct btrfs_device *device);
0019 int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs);
0020 void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
0021 void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices);
0022 void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
0023 u64 bit, enum btrfs_feature_set set);
0024 void btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action);
0025
0026 int __init btrfs_init_sysfs(void);
0027 void __cold btrfs_exit_sysfs(void);
0028 int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
0029 void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
0030 void btrfs_sysfs_add_block_group_type(struct btrfs_block_group *cache);
0031 int btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,
0032 struct btrfs_space_info *space_info);
0033 void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info);
0034 void btrfs_sysfs_update_devid(struct btrfs_device *device);
0035
0036 int btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info *fs_info,
0037 struct btrfs_qgroup *qgroup);
0038 void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info);
0039 int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info);
0040 void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
0041 struct btrfs_qgroup *qgroup);
0042
0043 #endif