xref: /linux/fs/bcachefs/sb-errors.h (revision f5d26fa31ed2e260589f0bc8af010bb742f1231e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_SB_ERRORS_H
3 #define _BCACHEFS_SB_ERRORS_H
4 
5 #include "sb-errors_types.h"
6 
7 #define BCH_SB_ERRS()
8 
9 enum bch_sb_error_id {
10 #define x(t, n) BCH_FSCK_ERR_##t = n,
11 	BCH_SB_ERRS()
12 #undef x
13 	BCH_SB_ERR_MAX
14 };
15 
16 extern const struct bch_sb_field_ops bch_sb_field_ops_errors;
17 
18 void bch2_sb_error_count(struct bch_fs *, enum bch_sb_error_id);
19 
20 void bch2_sb_errors_from_cpu(struct bch_fs *);
21 
22 void bch2_fs_sb_errors_exit(struct bch_fs *);
23 void bch2_fs_sb_errors_init_early(struct bch_fs *);
24 int bch2_fs_sb_errors_init(struct bch_fs *);
25 
26 #endif /* _BCACHEFS_SB_ERRORS_H */
27