diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-08-05 00:41:41 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:12 -0400 |
commit | 18443cb9f005b5563e2e3da9b8ccd374a552c3b1 (patch) | |
tree | fb5acd81fb8562bd790263562c65d3cdf45a02d4 /fs/bcachefs/io.c | |
parent | 7a7d17b2f7c23c0891b0cbd13fafd3bc805b1b29 (diff) | |
download | lwn-18443cb9f005b5563e2e3da9b8ccd374a552c3b1.tar.gz lwn-18443cb9f005b5563e2e3da9b8ccd374a552c3b1.zip |
bcachefs: Update data move path for snapshots
The data move path operates on existing extents, and not within a
subvolume as the regular IO paths do. It needs to change because it may
cause existing extents to be split, and when splitting an existing
extent in an ancestor snapshot we need to make sure the new split has
the same visibility in child snapshots as the existing extent.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r-- | fs/bcachefs/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index bd96c6bebe18..002fd35e6bfe 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -1828,7 +1828,8 @@ static int __bch2_rbio_narrow_crcs(struct btree_trans *trans, if (!bch2_bkey_narrow_crcs(new, new_crc)) goto out; - ret = bch2_trans_update(trans, &iter, new, 0); + ret = bch2_trans_update(trans, &iter, new, + BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE); out: bch2_trans_iter_exit(trans, &iter); return ret; |