sysfs.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _BCACHEFS_SYSFS_H_
  3. #define _BCACHEFS_SYSFS_H_
  4. #include <linux/sysfs.h>
  5. #ifndef NO_BCACHEFS_SYSFS
  6. struct attribute;
  7. struct sysfs_ops;
  8. extern struct attribute *bch2_fs_files[];
  9. extern struct attribute *bch2_fs_counters_files[];
  10. extern struct attribute *bch2_fs_internal_files[];
  11. extern struct attribute *bch2_fs_opts_dir_files[];
  12. extern struct attribute *bch2_fs_time_stats_files[];
  13. extern struct attribute *bch2_dev_files[];
  14. extern const struct sysfs_ops bch2_fs_sysfs_ops;
  15. extern const struct sysfs_ops bch2_fs_counters_sysfs_ops;
  16. extern const struct sysfs_ops bch2_fs_internal_sysfs_ops;
  17. extern const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
  18. extern const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
  19. extern const struct sysfs_ops bch2_dev_sysfs_ops;
  20. int bch2_opts_create_sysfs_files(struct kobject *);
  21. #else
  22. static struct attribute *bch2_fs_files[] = {};
  23. static struct attribute *bch2_fs_counters_files[] = {};
  24. static struct attribute *bch2_fs_internal_files[] = {};
  25. static struct attribute *bch2_fs_opts_dir_files[] = {};
  26. static struct attribute *bch2_fs_time_stats_files[] = {};
  27. static struct attribute *bch2_dev_files[] = {};
  28. static const struct sysfs_ops bch2_fs_sysfs_ops;
  29. static const struct sysfs_ops bch2_fs_counters_sysfs_ops;
  30. static const struct sysfs_ops bch2_fs_internal_sysfs_ops;
  31. static const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
  32. static const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
  33. static const struct sysfs_ops bch2_dev_sysfs_ops;
  34. static inline int bch2_opts_create_sysfs_files(struct kobject *kobj) { return 0; }
  35. #endif /* NO_BCACHEFS_SYSFS */
  36. #endif /* _BCACHEFS_SYSFS_H_ */