diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-09 02:32:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-09 02:33:05 -0400 |
commit | 8d6138baac3b4fcd715c34cf325ae11b01a4ca67 (patch) | |
tree | 7b2aeefc77ca3c31e2686ca4bceaad13cd0a24d9 /libbcachefs/error.c | |
parent | 99caca2c70f312c4a2504a7e7a9c92a91426d885 (diff) |
Update bcachefs sources to cbccc6d869 bcachefs: Ratelimit ec error message
Diffstat (limited to 'libbcachefs/error.c')
-rw-r--r-- | libbcachefs/error.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbcachefs/error.c b/libbcachefs/error.c index 762abdf2..2fb5102e 100644 --- a/libbcachefs/error.c +++ b/libbcachefs/error.c @@ -104,7 +104,7 @@ int bch2_fsck_err(struct bch_fs *c, unsigned flags, const char *fmt, ...) { struct fsck_err_state *s = NULL; va_list args; - bool print = true, suppressing = false; + bool print = true, suppressing = false, inconsistent = false; struct printbuf buf = PRINTBUF, *out = &buf; int ret = -BCH_ERR_fsck_ignore; @@ -136,7 +136,7 @@ int bch2_fsck_err(struct bch_fs *c, unsigned flags, const char *fmt, ...) if (c->opts.errors != BCH_ON_ERROR_continue || !(flags & (FSCK_CAN_FIX|FSCK_CAN_IGNORE))) { prt_str(out, ", shutting down"); - bch2_inconsistent_error(c); + inconsistent = true; ret = -BCH_ERR_fsck_errors_not_fixed; } else if (flags & FSCK_CAN_FIX) { prt_str(out, ", fixing"); @@ -189,6 +189,9 @@ int bch2_fsck_err(struct bch_fs *c, unsigned flags, const char *fmt, ...) printbuf_exit(&buf); + if (inconsistent) + bch2_inconsistent_error(c); + if (ret == -BCH_ERR_fsck_fix) { set_bit(BCH_FS_ERRORS_FIXED, &c->flags); } else { |