From: Kautilya Tripathi Date: Wed, 22 Jul 2026 06:01:51 +0000 (+0530) Subject: crimson/seastore: keep on-page checksum in sync after merge_content_to X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f7b898ab6cc19eb0fe2b996648de51b7f26ecc6c;p=ceph.git crimson/seastore: keep on-page checksum in sync after merge_content_to When a rewrite transaction publishes via no-conflict handoff, merge_content_to can update an already CRC-stamped initial-pending fixedkv page (copy-dest of a concurrent split). It refreshed last_committed_crc but not the in-extent phy checksum, so the page could be written with new content and a stale stamp. Debug asserts only compare last_committed_crc to calc_crc32c(), so the mismatch survived until a later cold read aborted with "fixedkv extent checksum inconsistent". Recalculate the CRC and call update_in_extent_chksum_field together in both LBALeafNode and FixedKVInternalNode merge_content_to, matching apply_delta_and_adjust_crc / update_lba_mappings. Fixes: https://tracker.ceph.com/issues/77022 Signed-off-by: Kautilya Tripathi --- diff --git a/src/crimson/os/seastore/btree/fixed_kv_node.h b/src/crimson/os/seastore/btree/fixed_kv_node.h index 24475157938a..5a729c705201 100644 --- a/src/crimson/os/seastore/btree/fixed_kv_node.h +++ b/src/crimson/os/seastore/btree/fixed_kv_node.h @@ -543,8 +543,10 @@ struct FixedKVInternalNode } if (pending_version.get_last_committed_crc()) { // if pending_version has already calculated its crc, - // calculate it again. - pending_version.set_last_committed_crc(pending_version.calc_crc32c()); + // calculate it again and keep the on-page checksum in sync. + auto crc = pending_version.calc_crc32c(); + pending_version.set_last_committed_crc(crc); + pending_version.update_in_extent_chksum_field(crc); } } } diff --git a/src/crimson/os/seastore/lba/lba_btree_node.h b/src/crimson/os/seastore/lba/lba_btree_node.h index 7dad89038a39..4513afdc4ef9 100644 --- a/src/crimson/os/seastore/lba/lba_btree_node.h +++ b/src/crimson/os/seastore/lba/lba_btree_node.h @@ -394,8 +394,10 @@ struct LBALeafNode if (pending_version.is_initial_pending() && pending_version.get_last_committed_crc()) { // if pending_version has already calculated its crc, - // calculate it again. - pending_version.set_last_committed_crc(pending_version.calc_crc32c()); + // calculate it again and keep the on-page checksum in sync. + auto crc = pending_version.calc_crc32c(); + pending_version.set_last_committed_crc(crc); + pending_version.update_in_extent_chksum_field(crc); } return modified; }