summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-03 21:51:31 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:11 -0400
commit6bdbfa87a832c0d3766e1b680729fede21eca7dc (patch)
treeb65fdf0b65f9abc360689fc1871a06935955b32b /fs/bcachefs/journal_io.c
parent636ad1d391b9e0f22107ace04e6dbc07d8875739 (diff)
downloadlwn-6bdbfa87a832c0d3766e1b680729fede21eca7dc.tar.gz
lwn-6bdbfa87a832c0d3766e1b680729fede21eca7dc.zip
bcachefs: Fix journal replay when replicas sb section missing
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 0bcc4346285c..eb2fbe235483 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -746,7 +746,8 @@ int bch2_journal_read(struct bch_fs *c, struct list_head *list)
jlist.ret = 0;
for_each_member_device(ca, c, iter) {
- if (!(bch2_dev_has_data(c, ca) & (1 << BCH_DATA_JOURNAL)))
+ if (!test_bit(BCH_FS_REBUILD_REPLICAS, &c->flags) &&
+ !(bch2_dev_has_data(c, ca) & (1 << BCH_DATA_JOURNAL)))
continue;
if ((ca->mi.state == BCH_MEMBER_STATE_RW ||