mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
bcachefs: Fix reflink path for snapshots
make_extent_indirect() was missing the BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE - it's updating the extent in the original snapshot, not the curret one. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
fc6c01e2ea
commit
f449bedb06
@ -184,7 +184,8 @@ static int bch2_make_extent_indirect(struct btree_trans *trans,
|
||||
|
||||
r_p->v.idx = cpu_to_le64(bkey_start_offset(&r_v->k));
|
||||
|
||||
ret = bch2_trans_update(trans, extent_iter, &r_p->k_i, 0);
|
||||
ret = bch2_trans_update(trans, extent_iter, &r_p->k_i,
|
||||
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE);
|
||||
err:
|
||||
c->reflink_hint = reflink_iter.pos.offset;
|
||||
bch2_trans_iter_exit(trans, &reflink_iter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user