sysfs.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef BTRFS_SYSFS_H
  3. #define BTRFS_SYSFS_H
  4. #include <linux/kobject.h>
  5. enum btrfs_feature_set {
  6. FEAT_COMPAT,
  7. FEAT_COMPAT_RO,
  8. FEAT_INCOMPAT,
  9. FEAT_MAX
  10. };
  11. char *btrfs_printable_features(enum btrfs_feature_set set, u64 flags);
  12. const char *btrfs_feature_set_name(enum btrfs_feature_set set);
  13. int btrfs_sysfs_add_device(struct btrfs_device *device);
  14. void btrfs_sysfs_remove_device(struct btrfs_device *device);
  15. int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs);
  16. void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
  17. void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices);
  18. void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
  19. u64 bit, enum btrfs_feature_set set);
  20. void btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action);
  21. int __init btrfs_init_sysfs(void);
  22. void __cold btrfs_exit_sysfs(void);
  23. int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
  24. void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
  25. void btrfs_sysfs_add_block_group_type(struct btrfs_block_group *cache);
  26. int btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,
  27. struct btrfs_space_info *space_info);
  28. void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info);
  29. void btrfs_sysfs_update_devid(struct btrfs_device *device);
  30. int btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info *fs_info,
  31. struct btrfs_qgroup *qgroup);
  32. void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info);
  33. int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info);
  34. void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
  35. struct btrfs_qgroup *qgroup);
  36. #endif