diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-25 23:29:37 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 04:11:08 +0300 |
commit | 94119eeb02d114aa1f78dcfaabdca50b9b626790 (patch) | |
tree | ff13ee14b7f0aee14a85fa3805ac38dd6cd35e97 /fs/bcachefs/error.h | |
parent | 5394fe9494011de19baff276ce02a2f00eef568a (diff) | |
download | linux-94119eeb02d114aa1f78dcfaabdca50b9b626790.tar.xz |
bcachefs: Add IO error counts to bch_member
We now track IO errors per device since filesystem creation.
IO error counts can be viewed in sysfs, or with the 'bcachefs
show-super' command.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.h')
-rw-r--r-- | fs/bcachefs/error.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h index 7ce9540052e5..958b2bed4f39 100644 --- a/fs/bcachefs/error.h +++ b/fs/bcachefs/error.h @@ -179,26 +179,26 @@ do { \ void bch2_io_error_work(struct work_struct *); /* Does the error handling without logging a message */ -void bch2_io_error(struct bch_dev *); +void bch2_io_error(struct bch_dev *, enum bch_member_error_type); -#define bch2_dev_io_err_on(cond, ca, ...) \ +#define bch2_dev_io_err_on(cond, ca, _type, ...) \ ({ \ bool _ret = (cond); \ \ if (_ret) { \ bch_err_dev_ratelimited(ca, __VA_ARGS__); \ - bch2_io_error(ca); \ + bch2_io_error(ca, _type); \ } \ _ret; \ }) -#define bch2_dev_inum_io_err_on(cond, ca, ...) \ +#define bch2_dev_inum_io_err_on(cond, ca, _type, ...) \ ({ \ bool _ret = (cond); \ \ if (_ret) { \ bch_err_inum_offset_ratelimited(ca, __VA_ARGS__); \ - bch2_io_error(ca); \ + bch2_io_error(ca, _type); \ } \ _ret; \ }) |