summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-04-14 20:25:33 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:00 -0400
commitd62ab355d7475a0da3267c8376ef436ba92f72c1 (patch)
treebf4c13aeb3d83f1897a0888dae0c4575919e5e23 /fs/bcachefs/recovery.c
parent73a117d2d8a0d9923648653b6400f534e0038281 (diff)
downloadlwn-d62ab355d7475a0da3267c8376ef436ba92f72c1.tar.gz
lwn-d62ab355d7475a0da3267c8376ef436ba92f72c1.zip
bcachefs: Fix bch2_trans_mark_dev_sb()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 9991a4f67163..2dc3dee4efc8 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1333,10 +1333,12 @@ int bch2_fs_initialize(struct bch_fs *c)
* Write out the superblock and journal buckets, now that we can do
* btree updates
*/
- err = "error writing alloc info";
- ret = bch2_alloc_write(c, 0);
- if (ret)
- goto err;
+ err = "error marking superblock and journal";
+ for_each_member_device(ca, c, i) {
+ ret = bch2_trans_mark_dev_sb(c, ca);
+ if (ret)
+ goto err;
+ }
bch2_inode_init(c, &root_inode, 0, 0,
S_IFDIR|S_IRWXU|S_IRUGO|S_IXUGO, 0, NULL);