]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados/snap_set_diff: ignore truncates above size at start
authorIlya Dryomov <idryomov@gmail.com>
Sun, 18 Feb 2024 10:46:15 +0000 (11:46 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 15 Mar 2024 10:04:04 +0000 (11:04 +0100)
commit5dcdb39fbccb28f25ea3b209968582f14225ae62
tree10d6095997739813063a07fe93f9e8b3918505bd
parent25b03e310947e9ec44a89a7f6b4e4efd9d0663cf
librados/snap_set_diff: ignore truncates above size at start

Because currently calc_snap_set_diff() only ever appends to the running
diff, an excessive (either too large or completely bogus) zero extent
is reported in cases where an object is first expanded (with a snapshot
taken at that point) and then truncated but still above the size of the
object as of the starting snapshot.

Fixes: https://tracker.ceph.com/issues/63770
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 5b11fb314abefea390c5663c33e9e1ace6179974)
src/librados/snap_set_diff.cc
src/test/librbd/io/test_mock_ObjectRequest.cc