bcachefs: Go RW earlier, for normal rw mount
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 27 Nov 2024 02:27:16 +0000 (21:27 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:20 +0000 (01:36 -0500)
commitdb0667a4ed82b67779855674682956685fc71f15
tree24ef4a1e9b2df4ea8230154fc728b73103485236
parentd94159763649831024255a4ec3b4bd1e1bf3f234
bcachefs: Go RW earlier, for normal rw mount

Previously, when mounting read-write after a clean shutdown, we wouldn't
go read-write until after all the recovery passes completed.

Now, go RW early in recovery, the same as any other situation we'll need
to go read-write. This fixes a bug where we discover unlinked inodes
after a clean shutdown: repair fails because we're read only.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery_passes.c