bcachefs: Rename nofsck opt to fsck
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 4 Nov 2018 01:52:52 +0000 (21:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:11 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c
fs/bcachefs/opts.h
fs/bcachefs/recovery.c

index 99852e0eb22fc0c34f250d581f5e9ace41fd4db4..7e08592253a68b28ed1d605184fc825b754124a0 100644 (file)
@@ -1465,7 +1465,7 @@ static int bch2_fsck_walk_inodes_only(struct bch_fs *c)
 
 int bch2_fsck(struct bch_fs *c)
 {
-       if (!c->opts.nofsck)
+       if (c->opts.fsck)
                return bch2_fsck_full(c);
 
        if (!c->sb.clean &&
index 01f1cb53eb5f7d9e28cf273f4b4e5ea54cd695d5..52fb9781d933e128d1c7244933f36982ce6f02c0 100644 (file)
@@ -153,9 +153,9 @@ enum opt_type {
        BCH_OPT(journal_flush_disabled, u8,     OPT_RUNTIME,            \
                OPT_BOOL(),                                             \
                NO_SB_OPT,                      false)                  \
-       BCH_OPT(nofsck,                 u8,     OPT_MOUNT,              \
+       BCH_OPT(fsck,                   u8,     OPT_MOUNT,              \
                OPT_BOOL(),                                             \
-               NO_SB_OPT,                      false)                  \
+               NO_SB_OPT,                      true)                   \
        BCH_OPT(fix_errors,             u8,     OPT_MOUNT,              \
                OPT_BOOL(),                                             \
                NO_SB_OPT,                      false)                  \
index 6d603654d150391d49eb41b7a3327b398fb49788..2fd68a39d76a34514c8371f133143ed8a6b604de 100644 (file)
@@ -152,7 +152,7 @@ int bch2_fs_recovery(struct bch_fs *c)
                bch_info(c, "recovering from clean shutdown, journal seq %llu",
                         le64_to_cpu(clean->journal_seq));
 
-       if (!clean || !c->opts.nofsck) {
+       if (!clean || c->opts.fsck) {
                ret = bch2_journal_read(c, &journal);
                if (ret)
                        goto err;