mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
53f8a74cbe
Similar to btrfs_sysfs_add_devices_dir()'s refactoring, split btrfs_sysfs_remove_devices_dir() so that we don't have to use the device argument to indicate whether to free all devices or just one device. Export btrfs_sysfs_remove_device() as device operations outside of sysfs.c now calls this instead of btrfs_sysfs_remove_devices_dir(). btrfs_sysfs_remove_devices_dir() is renamed to btrfs_sysfs_remove_fs_devices() to suite its new role. Now, no one outside of sysfs.c calls btrfs_sysfs_remove_fs_devices() so it is redeclared s static. And the same function had to be moved before its first caller. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
44 lines
1.6 KiB
C
44 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef BTRFS_SYSFS_H
|
|
#define BTRFS_SYSFS_H
|
|
|
|
#include <linux/kobject.h>
|
|
|
|
enum btrfs_feature_set {
|
|
FEAT_COMPAT,
|
|
FEAT_COMPAT_RO,
|
|
FEAT_INCOMPAT,
|
|
FEAT_MAX
|
|
};
|
|
|
|
char *btrfs_printable_features(enum btrfs_feature_set set, u64 flags);
|
|
const char *btrfs_feature_set_name(enum btrfs_feature_set set);
|
|
int btrfs_sysfs_add_device(struct btrfs_device *device);
|
|
void btrfs_sysfs_remove_device(struct btrfs_device *device);
|
|
int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs);
|
|
void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
|
|
void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices);
|
|
void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
|
|
u64 bit, enum btrfs_feature_set set);
|
|
void btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action);
|
|
|
|
int __init btrfs_init_sysfs(void);
|
|
void __cold btrfs_exit_sysfs(void);
|
|
int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
|
|
void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
|
|
void btrfs_sysfs_add_block_group_type(struct btrfs_block_group *cache);
|
|
int btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,
|
|
struct btrfs_space_info *space_info);
|
|
void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info);
|
|
void btrfs_sysfs_update_devid(struct btrfs_device *device);
|
|
|
|
int btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info *fs_info,
|
|
struct btrfs_qgroup *qgroup);
|
|
void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info);
|
|
int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info);
|
|
void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
|
|
struct btrfs_qgroup *qgroup);
|
|
|
|
#endif
|