bcachefs: Refactor memcpy into direct assignment
[linux-block.git] / fs / bcachefs / sysfs.h
CommitLineData
1c6fdbd8
KO
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_SYSFS_H_
3#define _BCACHEFS_SYSFS_H_
4
5#include <linux/sysfs.h>
6
7#ifndef NO_BCACHEFS_SYSFS
8
9struct attribute;
10struct sysfs_ops;
11
12extern struct attribute *bch2_fs_files[];
104c6974 13extern struct attribute *bch2_fs_counters_files[];
1c6fdbd8
KO
14extern struct attribute *bch2_fs_internal_files[];
15extern struct attribute *bch2_fs_opts_dir_files[];
16extern struct attribute *bch2_fs_time_stats_files[];
17extern struct attribute *bch2_dev_files[];
18
104c6974
DH
19extern const struct sysfs_ops bch2_fs_sysfs_ops;
20extern const struct sysfs_ops bch2_fs_counters_sysfs_ops;
21extern const struct sysfs_ops bch2_fs_internal_sysfs_ops;
22extern const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
23extern const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
24extern const struct sysfs_ops bch2_dev_sysfs_ops;
1c6fdbd8
KO
25
26int bch2_opts_create_sysfs_files(struct kobject *);
27
28#else
29
30static struct attribute *bch2_fs_files[] = {};
104c6974 31static struct attribute *bch2_fs_counters_files[] = {};
1c6fdbd8
KO
32static struct attribute *bch2_fs_internal_files[] = {};
33static struct attribute *bch2_fs_opts_dir_files[] = {};
34static struct attribute *bch2_fs_time_stats_files[] = {};
35static struct attribute *bch2_dev_files[] = {};
36
37static const struct sysfs_ops bch2_fs_sysfs_ops;
104c6974 38static const struct sysfs_ops bch2_fs_counters_sysfs_ops;
1c6fdbd8
KO
39static const struct sysfs_ops bch2_fs_internal_sysfs_ops;
40static const struct sysfs_ops bch2_fs_opts_dir_sysfs_ops;
41static const struct sysfs_ops bch2_fs_time_stats_sysfs_ops;
42static const struct sysfs_ops bch2_dev_sysfs_ops;
43
44static inline int bch2_opts_create_sysfs_files(struct kobject *kobj) { return 0; }
45
46#endif /* NO_BCACHEFS_SYSFS */
47
48#endif /* _BCACHEFS_SYSFS_H_ */