osd: Fix incorrect rollback logic for partial write OI
Before this fix, when rolling back an OI, the system used the OI
from the primary to rollback to. This is wrong if the previous
write was a partial write. This may have a few consequences
during recovery (although its not clear any are serious) and in
EC direct reads, where a false-positive version mismatch will be
detected.
The test provided recreates the issue.
The fix provided modifies the rollback as it is being written.
Fixes: https://tracker.ceph.com/issues/76213 Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
# Conflicts:
# src/test/osd/TestECFailoverWithPeering.cc