summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-11-06 23:32:11 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:31 +0300
commite2ee3eaab72a059b29f079290b5773509df9524f (patch)
treecd66c550f6cc68a395f68150c9941dab2541d095 /fs/bcachefs/opts.h
parentef496cd268f45351820c3d268d01bd46c8b80b04 (diff)
downloadlinux-e2ee3eaab72a059b29f079290b5773509df9524f.tar.xz
bcachefs: Add an option for fsck error ratelimiting
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r--fs/bcachefs/opts.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index a6f1d3ec7b90..2bd8bce43269 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -68,6 +68,12 @@ enum opt_type {
* - helptext
*/
+#ifdef __KERNEL__
+#define RATELIMIT_ERRORS true
+#else
+#define RATELIMIT_ERRORS false
+#endif
+
#define BCH_OPTS() \
x(block_size, u16, \
OPT_FORMAT, \
@@ -227,6 +233,11 @@ enum opt_type {
OPT_BOOL(), \
NO_SB_OPT, false, \
NULL, "Fix errors during fsck without asking") \
+ x(ratelimit_errors, u8, \
+ OPT_MOUNT, \
+ OPT_BOOL(), \
+ NO_SB_OPT, RATELIMIT_ERRORS, \
+ NULL, "Ratelimit error messages during fsck") \
x(nochanges, u8, \
OPT_MOUNT, \
OPT_BOOL(), \