]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 7 Sep 2025 23:10:41 +0000 (00:10 +0100)
commitd02bf3c404811bb682c1e95b4c909cc94385bc19
treef6ed4e7a288c64f79044a679771a8f4abbf240b6
parent03c445690b6922b7f5b3d6df5b229d09a902e0c9
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