bcachefs: Don't disallow btree writes to RO devices
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 3 Aug 2020 17:58:36 +0000 (13:58 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:43 +0000 (17:08 -0400)
commit768b42a7eb91b556cfe7c467c0e7337602eb6f29
treede46e4da586f23d63eeb0553a6bb746aa66cc264
parent79e72a90936e9d19caf0ced4113e8d7659ebb2af
bcachefs: Don't disallow btree writes to RO devices

There's an inherent race with setting devices RO when they have dirty
btree nodes on them. We already check if a btree node is on an RO device
before we dirty it, so this patch just allows those writes so that we
don't have errors forcing the entire filesystem read only when trying to
remove a device.

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