Skip to content

Commit 3c24020

Browse files
author
Kent Overstreet
committed
bcachefs: Run BCH_RECOVERY_PASS_reconstruct_snapshots on missing subvol -> snapshot
Fix this repair path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent bdc32a1 commit 3c24020

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/bcachefs/subvolume.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "errcode.h"
77
#include "error.h"
88
#include "fs.h"
9+
#include "recovery_passes.h"
910
#include "snapshot.h"
1011
#include "subvolume.h"
1112

@@ -44,8 +45,8 @@ static int check_subvol(struct btree_trans *trans,
4445
ret = bch2_snapshot_lookup(trans, snapid, &snapshot);
4546

4647
if (bch2_err_matches(ret, ENOENT))
47-
bch_err(c, "subvolume %llu points to nonexistent snapshot %u",
48-
k.k->p.offset, snapid);
48+
return bch2_run_explicit_recovery_pass(c,
49+
BCH_RECOVERY_PASS_reconstruct_snapshots) ?: ret;
4950
if (ret)
5051
return ret;
5152

0 commit comments

Comments
 (0)