diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-11-30 00:36:50 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:18 +0300 |
commit | f449bedb068447d3e9b1d64a41852b2aaca36fda (patch) | |
tree | 3aaefc1e0f13a45ada2b95ac4bb2a945be4e206b /fs/bcachefs | |
parent | fc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b (diff) | |
download | linux-f449bedb068447d3e9b1d64a41852b2aaca36fda.tar.xz |
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>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/reflink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c index 8dcac7815c9f..c8d6d73681e0 100644 --- a/fs/bcachefs/reflink.c +++ b/fs/bcachefs/reflink.c @@ -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); |