Skip to content

common/options: convert long_desc to C string - #69098

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
MaxKellermann:common_options__long_desc__c_string
Jul 28, 2026
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
MaxKellermann:common_options__long_desc__c_string

Conversation

@MaxKellermann

Copy link
Copy Markdown
Member

All parameters are C strings (either C literals, except for MgrMonitor::update_from_paxos()) and there's no point in copying all of them onto the heap during startup.

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.

All parameters are C strings (either C literals, except for
MgrMonitor::update_from_paxos()) and there's no point in copying all
of them onto the heap during startup.

Signed-off-by: Max Kellermann <[email protected]>

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

lgtm. but might want to explain why we cannot change desc to const char* in the commit message. i think the reason is

opt.set_description(fmt::format("Debug level for {}", values.subsys.get_name(i)).c_str());
, so desc has a caller that long_desc does not.

@MaxKellermann

Copy link
Copy Markdown
Member Author

True, that's it. But I didn't find it necessary/useful to explain things that this PR does not do.

@tchaikov

tchaikov commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

partially agreed. but that might be the first question a reviewer or a future human reader will ask when they're reading this commit. a commit message noting it would save the efforts, but yeah, it's far from a blocker.

@sseshasa

Copy link
Copy Markdown
Contributor

@SrinivasaBharath
SrinivasaBharath merged commit 0718de9 into ceph:main Jul 28, 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.

4 participants