Skip to content

os/bluestore: omit deferred writes (v1 mode) when doing full onode overwrite. - #68783

Merged
SrinivasaBharath merged 2 commits into
ceph:mainfrom
gardran:wip-gardran-no-deferred-for-full-overwrite
Sep 4, 2026
Merged

SrinivasaBharath merged 2 commits into
ceph:mainfrom
gardran:wip-gardran-no-deferred-for-full-overwrite

Conversation

@gardran

@gardran gardran commented May 6, 2026

Copy link
Copy Markdown
Contributor

This helps to keep the object defragmented.
Includes relevant test cases for both V1 & V2 writes.

Based on #68775 to have proper perf counter values when testing Write V2.

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.

@gardran
gardran requested a review from a team as a code owner May 6, 2026 22:22
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

13 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

Comment thread src/os/bluestore/BlueStore.cc Outdated
@@ -16531,26 +16531,25 @@ uint32_t BlueStore::_do_write_small_with_maybe_blob_reuse(
<< tail_pad << std::dec << " of mutable " << *b << dendl;

if (!g_conf()->bluestore_debug_omit_block_device_write) {
if (b_len < prefer_deferred_size) {
dout(20) << __func__ << " deferring small 0x" << std::hex
if (b_len < prefer_deferred_size) {

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.

When fixing indentation please use the opportunity and replace tabs with spaces.

Comment thread src/os/bluestore/BlueStore.cc Resolved

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

Valuable optimization. Logic OK.
1 comment on interface
1 nit comment on tabs

@aclamk

aclamk commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@gardran
gardran force-pushed the wip-gardran-no-deferred-for-full-overwrite branch 3 times, most recently from fc3ece1 to cc1181c Compare July 1, 2026 22:52
@gardran

gardran commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Valuable optimization. Logic OK. 1 comment on interface 1 nit comment on tabs

Both should be fixed now, please review.

@ifed01

ifed01 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@ifed01

ifed01 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@ifed01

ifed01 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

@aclamk

aclamk commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@gardran
You opting out of documenting return value for _do_write_small_with_maybe_blob_reuse() ?

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

Approved,
though I would be happy to see documentation for return value from _do_write_small_with_maybe_blob_reuse from the author.

@gardran

gardran commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@gardran You opting out of documenting return value for _do_write_small_with_maybe_blob_reuse() ?

It's present in the header:
/// Determines if small write can reuse existing blob
/// and hence omit blob relocation.
/// Returns the amount of remaining bytes which need relocation,
/// effectively the possibe return values are for now:
/// * 0 - blob has been reused and writing has been staged
/// * min_alloc_size - no writing staged, blob to be relocated.
uint32_t _do_write_small_with_maybe_blob_reuse(

@gardran

gardran commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@ifed01

ifed01 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

I see a teuthology failure related to this PR : https://pulpito-ng.ceph.com/runs/jayaprakash-2026-07-15_18:38:17-rados-wip-jaya-bs-testing2-15-07-2026-distro-default-trial/jobs/366562

2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stdout:[ RUN      ] ObjectStore/StoreTestSpecificAUSize.OverwriteDeferredTest/1
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr:set_val_or_die(bluestore_debug_enforce_settings): 'hdd' is not one of the permitted values: default, hybrid, ssd./src/common/config.cc: In function 'void md_config_t::set_val_or_die(ConfigValues&, const ConfigTracker&, std::string_view, const std::string&)' thread 7f4c8922e040 time 2026-07-15T22:14:31.945453+0000
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr:./src/common/config.cc: 916: FAILED ceph_assert(ret == 0)
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr: ceph version 21.3.0-1062-g53bd002b (53bd002bcfb3593c937b1d74c7579f1a8e439fb3) umbrella (dev - None)
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x137) [0x7f4c8ab04fb5]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 2: /usr/lib/ceph/libceph-common.so.2(+0x1afcb6) [0x7f4c8ab0ccb6]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 3: (StoreTestFixture::SetVal(ceph::common::ConfigProxy&, char const*, char const*)+0x1a0) [0x55cd5de43800]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 4: (StoreTestSpecificAUSize_OverwriteDeferredTest_Test::TestBody()+0xf4) [0x55cd5ddd6c14]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 5: (testing::Test::Run()+0xe3) [0x55cd5dffd123]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 6: (testing::TestInfo::Run()+0x41d) [0x55cd5dffd5dd]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 7: ceph_test_objectstore(+0x60fea5) [0x55cd5e01aea5]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 8: (testing::internal::UnitTestImpl::RunAllTests()+0x63d) [0x55cd5e00f19d]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 9: (testing::UnitTest::Run()+0x8a) [0x55cd5e00c31a]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 10: main()
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 11: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f4c8a41fd90]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 12: __libc_start_main()
2026-07-15T22:14:31.945 INFO:teuthology.orchestra.run.trial022.stderr: 13: _start()

gardran added 2 commits July 16, 2026 18:34
…erwrite.

This helps to keep the object defragmented.
Includes relevant test cases for both V1 & V2 writes.

Includes ceph#68775 to have proper perf
counter values when testing Write V2.

Signed-off-by: Garry Drankovich <[email protected]>
Signed-off-by: Garry Drankovich <[email protected]>
@gardran
gardran force-pushed the wip-gardran-no-deferred-for-full-overwrite branch from cc1181c to 53f2417 Compare July 16, 2026 15:34
@gardran

gardran commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

I see a teuthology failure related to this PR : https://pulpito-ng.ceph.com/runs/jayaprakash-2026-07-15_18:38:17-rados-wip-jaya-bs-testing2-15-07-2026-distro-default-trial/jobs/366562

2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stdout:[ RUN      ] ObjectStore/StoreTestSpecificAUSize.OverwriteDeferredTest/1
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr:set_val_or_die(bluestore_debug_enforce_settings): 'hdd' is not one of the permitted values: default, hybrid, ssd./src/common/config.cc: In function 'void md_config_t::set_val_or_die(ConfigValues&, const ConfigTracker&, std::string_view, const std::string&)' thread 7f4c8922e040 time 2026-07-15T22:14:31.945453+0000
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr:./src/common/config.cc: 916: FAILED ceph_assert(ret == 0)
2026-07-15T22:14:31.943 INFO:teuthology.orchestra.run.trial022.stderr: ceph version 21.3.0-1062-g53bd002b (53bd002bcfb3593c937b1d74c7579f1a8e439fb3) umbrella (dev - None)
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x137) [0x7f4c8ab04fb5]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 2: /usr/lib/ceph/libceph-common.so.2(+0x1afcb6) [0x7f4c8ab0ccb6]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 3: (StoreTestFixture::SetVal(ceph::common::ConfigProxy&, char const*, char const*)+0x1a0) [0x55cd5de43800]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 4: (StoreTestSpecificAUSize_OverwriteDeferredTest_Test::TestBody()+0xf4) [0x55cd5ddd6c14]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 5: (testing::Test::Run()+0xe3) [0x55cd5dffd123]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 6: (testing::TestInfo::Run()+0x41d) [0x55cd5dffd5dd]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 7: ceph_test_objectstore(+0x60fea5) [0x55cd5e01aea5]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 8: (testing::internal::UnitTestImpl::RunAllTests()+0x63d) [0x55cd5e00f19d]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 9: (testing::UnitTest::Run()+0x8a) [0x55cd5e00c31a]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 10: main()
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 11: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f4c8a41fd90]
2026-07-15T22:14:31.944 INFO:teuthology.orchestra.run.trial022.stderr: 12: __libc_start_main()
2026-07-15T22:14:31.945 INFO:teuthology.orchestra.run.trial022.stderr: 13: _start()

Right, this missed the config parameter value change after recent merging of #68503
Fixed now, please re-run.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath2-testing-20260727.155959-main.

@ljflores

ljflores commented Sep 4, 2026

Copy link
Copy Markdown
Member

@SrinivasaBharath
SrinivasaBharath merged commit 7b0adfc into ceph:main Sep 4, 2026
6 checks passed
@gardran
gardran deleted the wip-gardran-no-deferred-for-full-overwrite branch September 7, 2026 11:12
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.

8 participants