Skip to content

osd: Support for OMAPs in EC Pools PR 2 - #66702

Closed
MattyWilliams22 wants to merge 2 commits into
ceph:mainfrom
MattyWilliams22:ec-omaps-pr2
Closed

MattyWilliams22 wants to merge 2 commits into
ceph:mainfrom
MattyWilliams22:ec-omaps-pr2

Conversation

@MattyWilliams22

@MattyWilliams22 MattyWilliams22 commented Dec 19, 2025 •

Copy link
Copy Markdown
Contributor

osd: Allow for recovery of OMAP header and entries in EC Pools

The first commit in this PR introduces the supports_omap pool flag which is added in PR 1: #66618

The second commit is the commit of interest.

Add omap fields to read_request_t, read_result_t, ECSubRead and ECSubReadReply.

Read and write omap header and entries if !omap_complete.

Require omap_complete to finish recovery.

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

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.

@MattyWilliams22

MattyWilliams22 commented Dec 23, 2025 •

Copy link
Copy Markdown
Contributor Author

jenkins test api

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@MattyWilliams22 MattyWilliams22 changed the title Support for OMAPs in EC Pools PR 2 osd: Support for OMAPs in EC Pools PR 2 Dec 23, 2025
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@MattyWilliams22
MattyWilliams22 marked this pull request as ready for review January 8, 2026 10:25
@MattyWilliams22
MattyWilliams22 requested a review from a team as a code owner January 8, 2026 10:25
Comment thread src/osd/ECMsgTypes.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECCommon.cc Resolved
Comment thread src/osd/ECCommon.cc Resolved
Comment thread src/test/osd/TestECBackend.cc Resolved
@MattyWilliams22
MattyWilliams22 force-pushed the ec-omaps-pr2 branch 2 times, most recently from 37b9b4a to 7b31634 Compare February 25, 2026 09:21
@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added mon and removed needs-rebase labels May 12, 2026
@MattyWilliams22
MattyWilliams22 force-pushed the ec-omaps-pr2 branch 2 times, most recently from ded19d8 to 67a2621 Compare May 12, 2026 12:23
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

1 similar comment
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Outdated
bool omap_satisfied = !get_parent()->get_pool().supports_omap() ||
!to_read.want_omap_header ||
complete.omap_header ||
complete.omap_complete;

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.

Shouldn't this be (complete.omap_header && complete.omap_complete) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have made this change and changed !to_read.want_omap_header to be (!to_read.want_omap_header && !to_read.want_omap_keys). Do you agree with that change too?

Comment thread src/osd/ECCommon.cc Resolved
Comment thread src/osd/ECMsgTypes.cc Resolved

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

Review part 1.

Comment thread src/mon/OSDMonitor.cc
@@ -8277,6 +8285,10 @@ int OSDMonitor::prepare_new_pool(string& name,
if (crimson) {
pi->set_flag(pg_pool_t::FLAG_CRIMSON);
}
if (pool_type == pg_pool_t::TYPE_REPLICATED

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.

What reads this flag and how much do we rely on it?

I am concerned about what happens with a new client talking to an old OSD - is it possible it will think that the replica pool does not support OMAP?

Comment thread src/mon/OSDMonitor.cc Resolved
Comment thread src/mon/OSDMonitor.cc Resolved
Comment thread src/mon/OSDMonitor.cc
if (rel >= ceph_release_t::umbrella) {
// Initialise FLAG_OMAP for every pool
for (auto& [pool_id, pool] : osdmap.get_pools()) {
if (!pool.has_flag(pg_pool_t::FLAG_OMAP) && pool.is_replicated()) {

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.

Temporary restriction on replica pools only? If so - worth a comment.

Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Comment thread src/osd/ECBackend.cc Resolved
Add omap fields to read_request_t, read_result_t, ECSubRead and ECSubReadReply.
Read and write omap header and entries if !omap_complete.
Require omap_complete to finish recovery.

Fixes: https://tracker.ceph.com/issues/74244
Signed-off-by: Matty Williams <[email protected]>
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

This PR has been combined into this PR: #66726

@MattyWilliams22
MattyWilliams22 deleted the ec-omaps-pr2 branch June 2, 2026 15:08
@MattyWilliams22
MattyWilliams22 restored the ec-omaps-pr2 branch July 20, 2026 14:32
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.

5 participants