162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci#ifndef BTRFS_SYSFS_H
462306a36Sopenharmony_ci#define BTRFS_SYSFS_H
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#include <linux/kobject.h>
762306a36Sopenharmony_ci
862306a36Sopenharmony_cienum btrfs_feature_set {
962306a36Sopenharmony_ci	FEAT_COMPAT,
1062306a36Sopenharmony_ci	FEAT_COMPAT_RO,
1162306a36Sopenharmony_ci	FEAT_INCOMPAT,
1262306a36Sopenharmony_ci	FEAT_MAX
1362306a36Sopenharmony_ci};
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cichar *btrfs_printable_features(enum btrfs_feature_set set, u64 flags);
1662306a36Sopenharmony_ciconst char *btrfs_feature_set_name(enum btrfs_feature_set set);
1762306a36Sopenharmony_ciint btrfs_sysfs_add_device(struct btrfs_device *device);
1862306a36Sopenharmony_civoid btrfs_sysfs_remove_device(struct btrfs_device *device);
1962306a36Sopenharmony_ciint btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs);
2062306a36Sopenharmony_civoid btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
2162306a36Sopenharmony_civoid btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices);
2262306a36Sopenharmony_civoid btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info);
2362306a36Sopenharmony_civoid btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action);
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciint __init btrfs_init_sysfs(void);
2662306a36Sopenharmony_civoid __cold btrfs_exit_sysfs(void);
2762306a36Sopenharmony_ciint btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
2862306a36Sopenharmony_civoid btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
2962306a36Sopenharmony_civoid btrfs_sysfs_add_block_group_type(struct btrfs_block_group *cache);
3062306a36Sopenharmony_ciint btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,
3162306a36Sopenharmony_ci				    struct btrfs_space_info *space_info);
3262306a36Sopenharmony_civoid btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info);
3362306a36Sopenharmony_civoid btrfs_sysfs_update_devid(struct btrfs_device *device);
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ciint btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info *fs_info,
3662306a36Sopenharmony_ci				struct btrfs_qgroup *qgroup);
3762306a36Sopenharmony_civoid btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info);
3862306a36Sopenharmony_ciint btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info);
3962306a36Sopenharmony_civoid btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
4062306a36Sopenharmony_ci				struct btrfs_qgroup *qgroup);
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci#endif
43