Skip to content

crimson/os/seastore/object_data_handler: cleanup read()#57432

Merged
cyx1231st merged 4 commits intoceph:mainfrom
cyx1231st:wip-seastore-cleanup-objdata-read
May 16, 2024
Merged

crimson/os/seastore/object_data_handler: cleanup read()#57432
cyx1231st merged 4 commits intoceph:mainfrom
cyx1231st:wip-seastore-cleanup-objdata-read

Conversation

@cyx1231st
Copy link
Member

@cyx1231st cyx1231st commented May 13, 2024

  • Refactor based on the read range, pin range and extent range.
  • MISC: Logs, variable names, asserts and indentions.

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@cyx1231st cyx1231st requested a review from a team as a code owner May 13, 2024 07:25
pins,
[ctx, loffset, len, &current, &ret](auto &pin)
-> read_iertr::future<> {
ceph_assert(current <= (loffset + len));
Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC it should be current < (loffset + len), modified.

).si_then([&ret, &l_current, l_current_end,
e_key, e_len](auto extent) {
assert(e_key == extent->get_laddr());
assert(e_len == extent->get_length());
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced by simpler checks without is_indirect, the original asserts should have been preserved above.

cyx1231st added 4 commits May 14, 2024 16:28
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
… read()

l_current is only allowed to be larger than pin_key for the first pin.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
Specifically, refactor based on read range, pin range and extent range.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
To make it easier to read, make sure there are 2 spaces per nesting.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
@cyx1231st cyx1231st force-pushed the wip-seastore-cleanup-objdata-read branch from 08ee029 to 1293bc9 Compare May 14, 2024 08:28
@cyx1231st
Copy link
Member Author

cyx1231st commented May 15, 2024

Should be ready for review, cc @ljx023

Copy link
Member

@myoungwon myoungwon left a comment

Choose a reason for hiding this comment

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

I think this is a nice cleanup for readability.

@cyx1231st cyx1231st merged commit a8099a6 into ceph:main May 16, 2024
@cyx1231st cyx1231st deleted the wip-seastore-cleanup-objdata-read branch May 16, 2024 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants