diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-02-21 01:47:58 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:55 +0200 |
commit | 2436cb9fada98d477bb3508a30e520ab3bfaae3e (patch) | |
tree | 8931dcf95d2ec9b8cecbd22527bf74e00461f355 /fs/bcachefs/error.c | |
parent | bcachefs: Rename BTREE_ID enums for consistency with other enums (diff) | |
download | linux-2436cb9fada98d477bb3508a30e520ab3bfaae3e.tar.xz linux-2436cb9fada98d477bb3508a30e520ab3bfaae3e.zip |
bcachefs: Use x-macros for more enums
This patch standardizes all the enums that have associated string tables
(probably more enums should have string tables).
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.c')
-rw-r--r-- | fs/bcachefs/error.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index cd46706fb6f5..a8ee1db8aa39 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -11,13 +11,13 @@ bool bch2_inconsistent_error(struct bch_fs *c) set_bit(BCH_FS_ERROR, &c->flags); switch (c->opts.errors) { - case BCH_ON_ERROR_CONTINUE: + case BCH_ON_ERROR_continue: return false; - case BCH_ON_ERROR_RO: + case BCH_ON_ERROR_ro: if (bch2_fs_emergency_read_only(c)) bch_err(c, "emergency read only"); return true; - case BCH_ON_ERROR_PANIC: + case BCH_ON_ERROR_panic: panic(bch2_fmt(c, "panic after error")); return true; default: @@ -38,10 +38,10 @@ void bch2_io_error_work(struct work_struct *work) bool dev; down_write(&c->state_lock); - dev = bch2_dev_state_allowed(c, ca, BCH_MEMBER_STATE_RO, + dev = bch2_dev_state_allowed(c, ca, BCH_MEMBER_STATE_ro, BCH_FORCE_IF_DEGRADED); if (dev - ? __bch2_dev_set_state(c, ca, BCH_MEMBER_STATE_RO, + ? __bch2_dev_set_state(c, ca, BCH_MEMBER_STATE_ro, BCH_FORCE_IF_DEGRADED) : bch2_fs_emergency_read_only(c)) bch_err(ca, |