diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-25 22:51:16 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 04:11:08 +0300 |
commit | f5d26fa31ed2e260589f0bc8af010bb742f1231e (patch) | |
tree | 3d80b5c4ea7ac0a01bf1dba58a104d84d5a70e9b /fs/bcachefs/sb-errors_types.h | |
parent | 94119eeb02d114aa1f78dcfaabdca50b9b626790 (diff) | |
download | linux-f5d26fa31ed2e260589f0bc8af010bb742f1231e.tar.xz |
bcachefs: bch_sb_field_errors
Add a new superblock section to keep counts of errors seen since
filesystem creation: we'll be addingcounters for every distinct fsck
error.
The new superblock section has entries of the for [ id, count,
time_of_last_error ]; this is intended to let us see what errors are
occuring - and getting fixed - via show-super output.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-errors_types.h')
-rw-r--r-- | fs/bcachefs/sb-errors_types.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/bcachefs/sb-errors_types.h b/fs/bcachefs/sb-errors_types.h new file mode 100644 index 000000000000..b1c099843a39 --- /dev/null +++ b/fs/bcachefs/sb-errors_types.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _BCACHEFS_SB_ERRORS_TYPES_H +#define _BCACHEFS_SB_ERRORS_TYPES_H + +#include "darray.h" + +struct bch_sb_error_entry_cpu { + u64 id:16, + nr:48; + u64 last_error_time; +}; + +typedef DARRAY(struct bch_sb_error_entry_cpu) bch_sb_errors_cpu; + +#endif /* _BCACHEFS_SB_ERRORS_TYPES_H */ + |