Repository navigation
tentacle: pybind/rbd: reset element count on iterator errors - #71338
Merged
Merged
Conversation
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)
idryomov
approved these changes
Aug 27, 2026
Contributor
|
This PR has been added to wip-yuri5-testing-20261005.150507-tentacle. |
Contributor
|
This PR has been added to wip-yuri4-testing-20261009.171448-tentacle. |
Contributor
|
Late to the party: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/79751
backport of #70755
parent tracker: https://tracker.ceph.com/issues/78937
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh