summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-09-09 00:49:23 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-09-09 00:49:23 -0800
commitae3a16bea46d83272f57f7055ef1a2a8b2de4f7c (patch)
treea4e9198a1d702334c7821b9d22985e0b4bcb1afb
parentd9f00e47f310a8283ff5cf023ec81a8f0c7f30e6 (diff)
bcache: Add a mount option to skip fsck during mount
-rw-r--r--drivers/md/bcache/opts.h3
-rw-r--r--drivers/md/bcache/super.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/md/bcache/opts.h b/drivers/md/bcache/opts.h
index bd490aa91b79..7ef0124f1beb 100644
--- a/drivers/md/bcache/opts.h
+++ b/drivers/md/bcache/opts.h
@@ -38,6 +38,9 @@ LE64_BITMASK(NO_SB_OPT, struct cache_sb, flags, 0, 0);
CACHE_SET_OPT(journal_flush_disabled, \
bch_bool_opt, 0, 2, \
NO_SB_OPT, true) \
+ CACHE_SET_OPT(nofsck, \
+ bch_bool_opt, 0, 2, \
+ NO_SB_OPT, true) \
CACHE_SET_SB_OPTS()
#define CACHE_SET_OPTS() \
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 0ac28a458f37..b4f6e6b0c7a7 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1356,9 +1356,11 @@ static const char *run_cache_set(struct cache_set *c)
bch_verbose(c, "fs gc done");
- bch_verbose(c, "starting fsck:");
- bch_fsck(c);
- bch_verbose(c, "fsck done");
+ if (!c->opts.nofsck) {
+ bch_verbose(c, "starting fsck:");
+ bch_fsck(c);
+ bch_verbose(c, "fsck done");
+ }
} else {
struct bkey_i_inode inode;
struct closure cl;