Skip to content

client: some improvements for Client.cc#65432

Merged
rishabh-d-dave merged 1 commit intoceph:mainfrom
rishabh-d-dave:client-improvements
Oct 3, 2025
Merged

client: some improvements for Client.cc#65432
rishabh-d-dave merged 1 commit intoceph:mainfrom
rishabh-d-dave:client-improvements

Conversation

@rishabh-d-dave
Copy link
Contributor

  1. Log entry is too short and multiple member functions can have same
    directory and therefore it's best to prefix log entry with member
    function's name so that it is easy to locate it in codebase.

  2. Variable name "err" doesn't necessarily hold error code but may hold
    a generic return value as well. Renaming it to "retval" will mildly and
    quietly emphasize this to the reader.

  3. Fix log entry in _rmdir() which incorrectly prefixes itself with "rmdir".

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

1. Log entry is too short and multiple member functions can have same
directory and therefore it's best to prefix log entry with member
function's name so that it is easy to locate it in codebase.

2. Variable name "err" doesn't necessarily hold error code but may hold
a generic return value as well. Renaming it to "retval" will mildly and
quietly emphasize this to the reader.

3. Fix log entry in _rmdir() which incorrectly prefixes itself with "rmdir".

Signed-off-by: Rishabh Dave <ridave@redhat.com>
Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

The retval is a bit unnecessary, but there's no harm. Approving this.

@rishabh-d-dave
Copy link
Contributor Author

The retval is a bit unnecessary, but there's no harm. Approving this.

"err" gives a false impression that return value is an error but it's not necessarily so.

@rishabh-d-dave rishabh-d-dave added wip-rishabh-testing Rishabh's testing label and removed needs-qa labels Sep 18, 2025
@rishabh-d-dave
Copy link
Contributor Author

This PR is under test in https://tracker.ceph.com/issues/73311.

Copy link
Contributor Author

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

@rishabh-d-dave rishabh-d-dave merged commit afdcc22 into ceph:main Oct 3, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System wip-rishabh-testing Rishabh's testing label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants