bcachefs: Fix nochanges/read_only interaction
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 23 Dec 2023 22:50:29 +0000 (17:50 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Jan 2024 04:24:19 +0000 (23:24 -0500)
commit62719cf33c3ad62986130a19496cd864a0ed06c3
treef82ecd9d2029d76f9a862302d6abd0a650aa482c
parent5e329145148d7e9fe5a07ecfc08682ef7334a4d1
bcachefs: Fix nochanges/read_only interaction

nochanges means "we cannot issue writes at all"; it's possible to go
into a pseudo read-write mode where we pin dirty metadata in memory,
which is used for fsck in dry run mode and doing journal replay on a
read only mount, but we do not want to allow an actual read-write mount
in nochanges mode.

But we do always want to allow early read-write, during recovery - this
patch clarifies that.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c
fs/bcachefs/opts.h
fs/bcachefs/recovery.c
fs/bcachefs/super.c