Commit fda7b1ff authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Create lost+found in correct snapshot

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 20826fe6
...@@ -283,11 +283,17 @@ static int lookup_lostfound(struct btree_trans *trans, u32 snapshot, ...@@ -283,11 +283,17 @@ static int lookup_lostfound(struct btree_trans *trans, u32 snapshot,
return ret; return ret;
create_lostfound: create_lostfound:
/*
* we always create lost+found in the root snapshot; we don't want
* different branches of the snapshot tree to have different lost+found
*/
snapshot = le32_to_cpu(st.root_snapshot);
/* /*
* XXX: we could have a nicer log message here if we had a nice way to * XXX: we could have a nicer log message here if we had a nice way to
* walk backpointers to print a path * walk backpointers to print a path
*/ */
bch_notice(c, "creating lost+found in snapshot %u", le32_to_cpu(st.root_snapshot)); bch_notice(c, "creating lost+found in subvol %llu snapshot %u",
root_inum.subvol, le32_to_cpu(st.root_snapshot));
u64 now = bch2_current_time(c); u64 now = bch2_current_time(c);
struct btree_iter lostfound_iter = { NULL }; struct btree_iter lostfound_iter = { NULL };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment