Skip to content

os/bluestore: do not add expanded space to allocator after allocmap recovery. - #68503

Merged
ifed01 merged 4 commits into
ceph:mainfrom
ifed01:wip-ifed-fix-ncb-expand
Jul 14, 2026
Merged

ifed01 merged 4 commits into
ceph:mainfrom
ifed01:wip-ifed-fix-ncb-expand

Conversation

@ifed01

@ifed01 ifed01 commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

NCB allocmap recovery procedure does mark the expanded space as free on its own so explicit adding of that space to allocator is redundant and has to be omitted.

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

Relies on and includes: #69173

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.

@ifed01
ifed01 requested a review from a team as a code owner April 21, 2026 12:29
@ifed01
ifed01 requested a review from aclamk April 21, 2026 12:30
@ifed01 ifed01 added the bug-fix label Apr 21, 2026
Comment thread src/os/bluestore/BlueStore.cc Resolved
@aclamk

aclamk commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

@ifed01 Can we move "rotational" commit to another PR?

  1. it feels unrelated to expand fixup
  2. expand fixup is OK, but rotational part need work/discussion

Update:
I see it now, the enforcement is used in the test to provide consistent behaviour.
But can the test be modified to deploy OSD only with MAIN device, making original enforcing ssd/hdd usable?

@ifed01

ifed01 commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@ifed01 Can we move "rotational" commit to another PR?

  1. it feels unrelated to expand fixup
  2. expand fixup is OK, but rotational part need work/discussion

Update: I see it now, the enforcement is used in the test to provide consistent behaviour. But can the test be modified to deploy OSD only with MAIN device, making original enforcing ssd/hdd usable?

Yes, it's here to make new test case happy.
The problem is that I can't unconditionally enforce NCB usage for any deployment without this stuff. And having single main device doesn't help here.
E.g. in my home lab having main device on top of a file on btrfs results in rotational mode usage even though fs sits on an SSD drive. For whatever reason such a "file device" is detected as rotational. Hence NCB mode is not applied...

@github-actions

github-actions Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

! changed: bluestore_debug_enforce_settings: old: ['default', 'hdd', 'ssd'] (global.yaml.in)
! changed: bluestore_debug_enforce_settings: new: ['default', 'hybrid', 'ssd'] (global.yaml.in)
! changed: bluestore_debug_enforce_settings: old: 'hdd' enforces settings intended for BlueStore on a rotational drive. 'ssd' enforces settings intended for BlueStore on an SSD. 'default' indicates that BlueStore is to use settings based on the detected hardware. (global.yaml.in)
! changed: bluestore_debug_enforce_settings: new: 'hybrid' enforces osd settings applicable to hybrid (AKA main=hdd, db/wal=ssd) disk setup. 'ssd' enforces osd settings applicable to all-flash disk setup. 'default' specifies automatic settings selection based on real detected hardware. (global.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@ifed01

ifed01 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@aclamk - this has been rebased on top of #69173 and it's now ready for the next review iteration

@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

ifed01 added 4 commits June 30, 2026 15:42
rotational/non-rotational OSD behavior for DB/WAL devices.

Prior to this commit this parameter determined what device class
settings to apply for BlueStore only. OSD had partially applied
actual journal/db/main device class for some operations, e.g. benchmark
on init or allocmap persistence, irrespective to this setting value.
This commit allows 'bluestore_debug_enforce_settings" to override the
actual device class completely.

Signed-off-by: Igor Fedotov <[email protected]>
@ifed01
ifed01 force-pushed the wip-ifed-fix-ncb-expand branch from 19eeb6e to 641038f Compare June 30, 2026 13:02
@ifed01

ifed01 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@amathuria

Copy link
Copy Markdown
Contributor

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