Skip to content

osd: Pin every EC extent cache line covered by a growth hole - #72331

Closed
aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-ec-cache-hole-pin
Closed

aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-ec-cache-hole-pin

Conversation

@aainscow

@aainscow aainscow commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

With EC optimizations, the extent cache can send an RMW pre-read in which every extent lies beyond read_mask(current_size), so do_read_op hits ceph_assert(reads_sent).

When an op grows an object, Object::request() adds the growth hole to do_not_read. do_not_read is cleared a line at a time by erase_line() when the last op pinning that line dies, but the growing op only pinned the lines of its own reads and writes. An older op pinning a line inside the hole could die while the growing op was still queued (for example behind another object's RMW read), erasing part of the hole before current_size caught up. The next op in that region would then read from the hole using the stale current_size.

The fix makes the growing op pin every line its hole spans, so the hole lives until that op completes.

This is separate from #70377 (stale projected_size on cache invalidate), which requires a clone.

Reproducers are in a separate PR stacked on this one.

Fixes: https://tracker.ceph.com/issues/81315

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@aainscow
aainscow requested a review from a team as a code owner October 2, 2026 08:09
@github-actions github-actions Bot added the core label Oct 2, 2026
When an op grows an object, Object::request() adds the gap between the
old and new projected size to do_not_read, so later ops do not read
data that is not yet on disk. do_not_read entries are erased a line at a
time when the last op pinning the line dies, but the growing op only
pinned the lines of its own reads and writes.

An older op pinning a line inside the hole could therefore die first and
erase that part of the hole while the growing op was still waiting for
its cache_ready, before current_size was updated. A following op would
then send reads in the hole with the old current_size, none survived the
read mask, and do_read_op hit ceph_assert(reads_sent).

Pin every line the hole spans, so that it lives until the growing op
completes.

Fixes: https://tracker.ceph.com/issues/81315
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath31-testing-20261006.075505-main.

@amathuria

Copy link
Copy Markdown
Contributor

@aainscow

Copy link
Copy Markdown
Contributor Author

Superseded by #72683, which carries this commit unchanged, together with the fix for writes queued behind a cache invalidation (https://tracker.ceph.com/issues/81754).

@aainscow aainscow closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants