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>
This commit is contained in:
Ilya Dryomov 2024-02-18 11:46:15 +01:00
parent 435306d9b2
commit 5b11fb314a
2 changed files with 451 additions and 15 deletions