Repository navigation
osd: Set projected_size to current_size on cache invalidate. - #70377
Merged
aainscow merged 1 commit intoSep 7, 2026
Merged
Conversation
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]>
4 of 14 tasks
bill-scales
approved these changes
Jul 21, 2026
| * track the projected size in the replay. | ||
| */ | ||
| projected_size = invalidating_op->projected_size; | ||
| projected_size = current_size; |
Contributor
There was a problem hiding this comment.
ACK: rollback projected_size to current_size then replay the outstanding ops which will increase projected_size again but also set up do_not_read
Contributor
|
This PR has been added to wip-bharath14-testing-20260826.230942-main. |
This was referenced Sep 23, 2026
4 of 14 tasks
This was referenced Oct 13, 2026
Merged
Contributor
Author
|
Being reverted by #72666: this change introduced a regression, https://tracker.ceph.com/issues/81611. |
aainscow
added a commit
to aainscow/ceph
that referenced
this pull request
Oct 14, 2026
…lidate-ec-extent-cache-fix" This reverts commit 93a785e, reversing changes made to cb76fd5. 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]>
This was referenced Oct 14, 2026
aainscow
added a commit
to aainscow/ceph
that referenced
this pull request
Oct 14, 2026
…lidate-ec-extent-cache-fix" This reverts commit 93a785e, reversing changes made to cb76fd5. 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]>
aainscow
added a commit
to aainscow/ceph
that referenced
this pull request
Oct 14, 2026
…lidate-ec-extent-cache-fix" This reverts commit 93a785e, reversing changes made to cb76fd5. 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]>
aainscow
added a commit
that referenced
this pull request
Oct 22, 2026
osd: revert #70377 "Set projected_size to current_size on cache invalidate." Reviewed-by: Bill Scales <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Unit tests and recreate are under a different PR: #70371
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
Assisted-by: IBM-Bob 2.0.1/Claude Sonnet/GPT-5
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.