Skip to content

tentacle: pybind/rbd: reset element count on iterator errors - #71338

Merged
batrick merged 2 commits into
ceph:tentaclefrom
ajarr:wip-79751-tentacle
Oct 12, 2026
Merged

batrick merged 2 commits into
ceph:tentaclefrom
ajarr:wip-79751-tentacle

Conversation

@ajarr

@ajarr ajarr commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

ajarr and others added 2 commits August 25, 2026 21:34
Reset the element count to zero in the iterator classes when a C API
listing call fails. This ensures that the corresponding cleanup C API
is invoked with the correct number of initialized elements if an
exception is raised.

Previously, the iterator retained the requested element count on error,
allowing the cleanup C API to process entries that were never
initialized. This happens to be harmless today because the C APIs
zero-initialize the allocated arrays with memset, but the cleanup
logic should not rely on that implementation detail.

Fixes: https://tracker.ceph.com/issues/78937
Signed-off-by: Ramana Raja <[email protected]>
Co-authored-by: VinayBhaskar-V <[email protected]>
(cherry picked from commit 6f1b5b1)
- In ImageIterator, follow the established ERANGE retry pattern when
  listing images.
- Add missing trash image sources.
- In TrashIterator, guard `rbd_trash_list_cleanup()` against a
  NULL trash `entries` pointer.
- In TrashIterator, remove the redundant trash entry count assignment.

Signed-off-by: Ramana Raja <[email protected]>
(cherry picked from commit f7660f6)
@ajarr
ajarr requested a review from a team as a code owner August 26, 2026 01:34
@ajarr ajarr added this to the tentacle milestone Aug 26, 2026
@ajarr ajarr added the pybind label Aug 26, 2026
@github-actions github-actions Bot added rbd releng-audit-pass Release engineering: passed backport verification audit. labels Aug 26, 2026
@yuriw

yuriw commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri5-testing-20261005.150507-tentacle.

@yuriw

yuriw commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri4-testing-20261009.171448-tentacle.

@batrick batrick modified the milestones: tentacle, v20.2.5 Oct 12, 2026
@batrick
batrick merged commit 471f9c8 into ceph:tentacle Oct 12, 2026
14 checks passed
@ronen-fr

Copy link
Copy Markdown
Contributor

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.

5 participants