summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-06-28 18:10:47 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-14 19:00:16 -0400
commitb1d63b06e8398eb048dcc455acc628e6655d7499 (patch)
tree055d458cccaa7dd453f06f18fcaed679d5b313e8 /fs/bcachefs/fs.c
parent9d9d212e26399c04c567c232f500179cbdc8dc7e (diff)
bcachefs: Make read_only a mount option again, but hidden
fsck passes read_only as a mount option, and it's required for nochanges, which it also uses. Usually read_only is handled by the VFS, but we need to be able to handle it too; we just don't want to print it out twice, so mark it as a hidden option. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r--fs/bcachefs/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index b734d91c4446..24fba256eb8b 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1800,7 +1800,8 @@ static int bch2_show_options(struct seq_file *seq, struct dentry *root)
const struct bch_option *opt = &bch2_opt_table[i];
u64 v = bch2_opt_get_by_id(&c->opts, i);
- if (!(opt->flags & OPT_MOUNT))
+ if ((opt->flags & OPT_HIDDEN) ||
+ !(opt->flags & OPT_MOUNT))
continue;
if (v == bch2_opt_get_by_id(&bch2_opts_default, i))