]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/sysfs.h
bcachefs-in-userspace improvements
[bcachefs-tools-debian] / libbcachefs / sysfs.h
1 #ifndef _BCACHE_SYSFS_H_
2 #define _BCACHE_SYSFS_H_
3
4 #include <linux/sysfs.h>
5
6 #ifndef NO_BCACHE_SYSFS
7
8 struct attribute;
9 struct sysfs_ops;
10
11 extern struct attribute *bch2_fs_files[];
12 extern struct attribute *bch2_fs_internal_files[];
13 extern struct attribute *bch2_fs_opts_dir_files[];
14 extern struct attribute *bch2_fs_time_stats_files[];
15 extern struct attribute *bch2_dev_files[];
16
17 extern struct sysfs_ops bch2_fs_sysfs_ops;
18 extern struct sysfs_ops bch2_fs_internal_sysfs_ops;
19 extern struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
20 extern struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
21 extern struct sysfs_ops bch2_dev_sysfs_ops;
22
23 #else
24
25 static struct attribute *bch2_fs_files[] = {};
26 static struct attribute *bch2_fs_internal_files[] = {};
27 static struct attribute *bch2_fs_opts_dir_files[] = {};
28 static struct attribute *bch2_fs_time_stats_files[] = {};
29 static struct attribute *bch2_dev_files[] = {};
30
31 static const struct sysfs_ops bch2_fs_sysfs_ops;
32 static const struct sysfs_ops bch2_fs_internal_sysfs_ops;
33 static const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
34 static const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
35 static const struct sysfs_ops bch2_dev_sysfs_ops;
36
37 #endif
38
39 #endif  /* _BCACHE_SYSFS_H_ */