bcachefs-tools/libbcachefs/sysfs.h

49 lines
1.6 KiB
C
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_SYSFS_H_
#define _BCACHEFS_SYSFS_H_
2017-01-08 12:13:18 +03:00
#include <linux/sysfs.h>
2017-01-08 12:13:18 +03:00
#ifndef NO_BCACHEFS_SYSFS
2017-01-08 12:13:18 +03:00
struct attribute;
struct sysfs_ops;
2017-01-08 12:13:18 +03:00
extern struct attribute *bch2_fs_files[];
extern struct attribute *bch2_fs_counters_files[];
extern struct attribute *bch2_fs_internal_files[];
extern struct attribute *bch2_fs_opts_dir_files[];
extern struct attribute *bch2_fs_time_stats_files[];
extern struct attribute *bch2_dev_files[];
2017-01-08 12:13:18 +03:00
extern const struct sysfs_ops bch2_fs_sysfs_ops;
extern const struct sysfs_ops bch2_fs_counters_sysfs_ops;
extern const struct sysfs_ops bch2_fs_internal_sysfs_ops;
extern const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
extern const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
extern const struct sysfs_ops bch2_dev_sysfs_ops;
2017-01-08 12:13:18 +03:00
int bch2_opts_create_sysfs_files(struct kobject *);
#else
2017-01-08 12:13:18 +03:00
static struct attribute *bch2_fs_files[] = {};
static struct attribute *bch2_fs_counters_files[] = {};
static struct attribute *bch2_fs_internal_files[] = {};
static struct attribute *bch2_fs_opts_dir_files[] = {};
static struct attribute *bch2_fs_time_stats_files[] = {};
static struct attribute *bch2_dev_files[] = {};
2017-01-08 12:13:18 +03:00
static const struct sysfs_ops bch2_fs_sysfs_ops;
static const struct sysfs_ops bch2_fs_counters_sysfs_ops;
static const struct sysfs_ops bch2_fs_internal_sysfs_ops;
static const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
static const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
static const struct sysfs_ops bch2_dev_sysfs_ops;
2017-01-08 12:13:18 +03:00
static inline int bch2_opts_create_sysfs_files(struct kobject *kobj) { return 0; }
#endif /* NO_BCACHEFS_SYSFS */
2017-01-08 12:13:18 +03:00
#endif /* _BCACHEFS_SYSFS_H_ */