]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: Correct truncate logic for new EC
authorAlex Ainscow <aainscow@uk.ibm.com>
Fri, 20 Jun 2025 20:47:32 +0000 (21:47 +0100)
committerJon <jonathan.bailey1@ibm.com>
Fri, 3 Oct 2025 13:31:23 +0000 (14:31 +0100)
commita685a8a080069cbaee484c3d49d856960d927c39
tree9a093a00cceaebaceb4a341f4c4e3e0ff4e07767
parent0999c75741259dc9feafc16d2f7e73a46cab7297
osd: Correct truncate logic for new EC

The clone logic in the truncate was only cloning from the truncate
to the end of the pre-truncate object. If the next shard was being
truncated to a shorter length (which is common), then this shard
has a larger clone.

The rollback, however, can only be given a single range, so it was
given a range which covers all clones.  The problem is that if shard
0 is rolled back, then some empty space from the clone was copied
to shard 0.

Fix is easy - calculate the full clone length and apply to all shards, so it matches the rollback.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 5d7588c051b31098c9970877ab6a784967ff94c8)
src/osd/ECTransaction.cc