]> www.infradead.org Git - linux.git/commit
bcachefs: Fix safe errors by default
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 19 Jun 2024 13:55:48 +0000 (09:55 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 20 Jun 2024 13:13:09 +0000 (09:13 -0400)
commit33dfafa90285c0873a24d633877d505ab8e3fc20
treeb7088c251960b5ac147b8abc74d1ea27fa12ac52
parenta56da69799bd5f0c72bdc0fb64c3e3d8c1b1bb36
bcachefs: Fix safe errors by default

i.e. the start of automatic self healing:

If errors=continue or fix_safe, we now automatically fix simple errors
without user intervention.

New error action option: fix_safe

This replaces the existing errors=ro option, which gets a new slot, i.e.
existing errors=ro users now get errors=fix_safe.

This is currently only enabled for a limited set of errors - initially
just disk accounting; errors we would never not want to fix, and we
don't want to require user intervention (i.e. to make sure a bug report
gets filed).

Errors will still be counted in the superblock, so we (developers) will
still know they've been occuring if a bug report gets filed (as bug
reports typically include the errors superblock section).

Eventually we'll be enabling this for a much wider set of errors, after
we've done thorough error injection testing.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/error.c
fs/bcachefs/error.h
fs/bcachefs/opts.h
fs/bcachefs/sb-errors_format.h