diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-06 18:49:35 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:50 -0400 |
commit | 29d90f61eb341018ab571e7f8ceb8ff39cf5353a (patch) | |
tree | eca17ebf075e30e05fbb8dc8c747ca0c1872393c /fs/bcachefs/journal_io.c | |
parent | c859430b1728d59ca6e4d7e9356db82979e2fd5b (diff) | |
download | lwn-29d90f61eb341018ab571e7f8ceb8ff39cf5353a.tar.gz lwn-29d90f61eb341018ab571e7f8ceb8ff39cf5353a.zip |
bcachefs: Don't error out of recovery process on journal read error
We don't want to fail the recovery/mount because of a single error
reading from the journal - the relevant journal entry may still be found
on other devices, and missing or no journal entries found is already
handled later in the recovery process.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r-- | fs/bcachefs/journal_io.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index cba420565248..ef4d48081975 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -576,8 +576,15 @@ reread: if (bch2_dev_io_err_on(ret, ca, "journal read error: sector %llu", offset) || - bch2_meta_read_fault("journal")) - return -EIO; + bch2_meta_read_fault("journal")) { + /* + * We don't error out of the recovery process + * here, since the relevant journal entry may be + * found on a different device, and missing or + * no journal entries will be handled later + */ + return 0; + } j = buf->data; } |