sysfs.h (b33151e7b3a3d057f975852164581d89b2e6716a) | sysfs.h (89439109bc2be5f19c0955d392fb6ea7d0f4ecb3) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef BTRFS_SYSFS_H 4#define BTRFS_SYSFS_H 5 6enum btrfs_feature_set { 7 FEAT_COMPAT, 8 FEAT_COMPAT_RO, --- 21 unchanged lines hidden (view full) --- 30 31 32struct btrfs_feature_attr { 33 struct kobj_attribute kobj_attr; 34 enum btrfs_feature_set feature_set; 35 u64 feature_bit; 36}; 37 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef BTRFS_SYSFS_H 4#define BTRFS_SYSFS_H 5 6enum btrfs_feature_set { 7 FEAT_COMPAT, 8 FEAT_COMPAT_RO, --- 21 unchanged lines hidden (view full) --- 30 31 32struct btrfs_feature_attr { 33 struct kobj_attribute kobj_attr; 34 enum btrfs_feature_set feature_set; 35 u64 feature_bit; 36}; 37 |
38/* For raid type sysfs entries */ 39struct raid_kobject { 40 u64 flags; 41 struct kobject kobj; 42}; 43 |
|
38#define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit) \ 39static struct btrfs_feature_attr btrfs_attr_features_##_name = { \ 40 .kobj_attr = __INIT_KOBJ_ATTR(_name, S_IRUGO, \ 41 btrfs_feature_attr_show, \ 42 btrfs_feature_attr_store), \ 43 .feature_set = _feature_set, \ 44 .feature_bit = _feature_prefix ##_## _feature_bit, \ 45} --- 35 unchanged lines hidden (view full) --- 81 struct btrfs_device *one_device); 82int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, 83 struct kobject *parent); 84int btrfs_sysfs_add_device(struct btrfs_fs_devices *fs_devs); 85void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs); 86void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, 87 u64 bit, enum btrfs_feature_set set); 88 | 44#define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit) \ 45static struct btrfs_feature_attr btrfs_attr_features_##_name = { \ 46 .kobj_attr = __INIT_KOBJ_ATTR(_name, S_IRUGO, \ 47 btrfs_feature_attr_show, \ 48 btrfs_feature_attr_store), \ 49 .feature_set = _feature_set, \ 50 .feature_bit = _feature_prefix ##_## _feature_bit, \ 51} --- 35 unchanged lines hidden (view full) --- 87 struct btrfs_device *one_device); 88int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, 89 struct kobject *parent); 90int btrfs_sysfs_add_device(struct btrfs_fs_devices *fs_devs); 91void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs); 92void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, 93 u64 bit, enum btrfs_feature_set set); 94 |
95int __init btrfs_init_sysfs(void); 96void __cold btrfs_exit_sysfs(void); 97int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info); 98void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info); 99 |
|
89#endif | 100#endif |