Skip to content

tentacle: osd: Set projected_size to current_size on cache invalidate. - #72012

Merged
batrick merged 1 commit into
ceph:tentaclefrom
aainscow:wip-78467-tentacle
Oct 9, 2026
Merged

batrick merged 1 commit into
ceph:tentaclefrom
aainscow:wip-78467-tentacle

Conversation

@aainscow

Copy link
Copy Markdown
Contributor

When EC is dealing with resizing objects, it tracks the current_size (which
reflects the size of the object on-disk) and projected size, which is the
size the object will be once all queued transactions are applied.

Since the expanded space of an object contains either write data, or a hole,
the extent cache can void reading it for any future writes while it is active.
It does this by marking "do_not_read" with this gap.

The extent cache then relies on do_not_read generating reads beyond the end
of current_size.

The bug here is that during a cache invalidate, adding to do_not_read was skipped
and in some situations, this could lead to a follow on op attempting to read
off the end of an object.

Fixes: https://tracker.ceph.com/issues/78465
Signed-off-by: Alex Ainscow <[email protected]>
Assisted-by: IBM-Bob 2.0.1/Claude Sonnet/GPT-5
Signed-off-by: Alex Ainscow <[email protected]>
(cherry picked from commit a970eae)
@aainscow
aainscow requested a review from a team as a code owner September 23, 2026 14:04
@aainscow aainscow added this to the tentacle milestone Sep 23, 2026
@aainscow aainscow added the core label Sep 23, 2026
@github-actions github-actions Bot added the releng-audit-pass Release engineering: passed backport verification audit. label Sep 23, 2026
@batrick batrick modified the milestones: tentacle, v20.2.5 Sep 23, 2026
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath28-testing-20260924.103245-tentacle.

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@aainscow
aainscow requested a review from jamiepryde October 9, 2026 10:21

@jamiepryde jamiepryde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@batrick
batrick merged commit f4ffa55 into ceph:tentacle Oct 9, 2026
21 checks passed
@aainscow

Copy link
Copy Markdown
Contributor Author

Being reverted by #72650: this backport introduced a regression, https://tracker.ceph.com/issues/81611.

aainscow added a commit to aainscow/ceph that referenced this pull request Oct 13, 2026
This reverts commit f4ffa55, reversing
changes made to 37e259b.

With that change, ECExtentCache::Object::invalidate() sets projected_size
to current_size, so replaying a queued rollback re-adds the rolled-back
data as a growth hole in do_not_read. Writes queued behind the rollback
then skip reading that data and zero-fill the parts of pages they do not
overwrite.

See: https://tracker.ceph.com/issues/81611
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
batrick added a commit that referenced this pull request Oct 14, 2026
* refs/pull/72650/head:
	Revert "Merge PR #72012 into tentacle"

Reviewed-by: Patrick Donnelly <[email protected]>
Reviewed-by: Bill Scales <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core needs-qa releng-audit-pass Release engineering: passed backport verification audit. wip-bharath28-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants