Skip to content

os/bluestore: Fix write v2 compressed write missing dirty_range - #70615

Merged
Jayaprakash-ibm merged 5 commits into
ceph:mainfrom
aclamk:aclamk-bs-write-v2-64k-compress-reject
Nov 2, 2026
Merged

Jayaprakash-ibm merged 5 commits into
ceph:mainfrom
aclamk:aclamk-bs-write-v2-64k-compress-reject

Conversation

@aclamk

@aclamk aclamk commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

The problem can happen when attempted compressed write v2 has to fallback to uncompressed write v2.
The uncompressed write can merge extent on left boundary, ignoring the fact that it might be in other shard.
The code did not mark the other shard as dirty.
Now properly detecting merging extents and changing affected range.

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

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.

@aclamk
aclamk requested a review from a team as a code owner July 28, 2026 09:56
@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from e25bfd7 to c88b21f Compare July 28, 2026 10:44
Comment thread src/test/objectstore/store_test.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved

@ifed01 ifed01 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.

Overall LGTM, just there is a couple of minor improvements worth applying.

@ifed01

ifed01 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from c88b21f to b747be6 Compare August 6, 2026 14:09

@ifed01 ifed01 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.

"make check" is failing now

@ifed01

ifed01 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

"make check" is failing now

/ceph/src/test/objectstore/test_bluestore_types.cc:2716:23: error: no matching constructor for initialization of 'BlueStore::Writer'
2716 | BlueStore::Writer w(store, &txc, &wctx, o);
| ^ ~~~~~~~~~~~~~~~~~~~~~
/ceph/src/os/bluestore/Writer.h:60:3: note: candidate constructor not viable: requires 6 arguments, but 4 were provided
60 | Writer(BlueStore* bstore, TransContext* txc, WriteContext* wctx, OnodeRef o,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61 | uint32_t left_affected_range, uint32_t right_affected_range)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from b747be6 to 776d7f7 Compare August 11, 2026 18:07
@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@ifed01

ifed01 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from 776d7f7 to 743b7c1 Compare September 22, 2026 09:43
@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

This PR has been added to wip-jaya-bs-testing-10-27-2026.

Add debug/unittest function that forces specific resharding.
The function is unsuitable for general IO processing.

Signed-off-by: Adam Kupczyk <[email protected]>
@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from 743b7c1 to a1a3847 Compare October 28, 2026 12:30
Reshuffle modified access to ExtentMap::ReshardPlan.
The easiest solution was to modify arguments.

Signed-off-by: Adam Kupczyk <[email protected]>
Can happen when attempted compressed write v2 has to fallback
to uncompressed write v2.
The uncompressed write can merges extent on left boundary,
ignoring the fact that it might be in other shard.
The code did not mark the other shard as dirty.

Signed-off-by: Adam Kupczyk <[email protected]>
Can happen when attempted compressed write v2 has to fallback
to uncompressed write v2.
The uncompressed write can merges extent on left boundary,
ignoring the fact that it might be in other shard.
The code did not mark the other shard as dirty.
Now properly detecting merging extents and changing affected range.

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

Signed-off-by: Adam Kupczyk <[email protected]>
Make possible to signel initial affected range on constructor.
1) Set initial affected range on Writer construction.
2) Perform desired operation.
3) Retrieve final affected range.

Signed-off-by: Adam Kupczyk <[email protected]>
@aclamk
aclamk force-pushed the aclamk-bs-write-v2-64k-compress-reject branch from a1a3847 to 5887121 Compare October 28, 2026 12:42
@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@Jayaprakash-ibm
Jayaprakash-ibm merged commit d9ff21a into ceph:main Nov 2, 2026
14 checks passed
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