Repository navigation
Conversation
Fixes: https://tracker.ceph.com/issues/75705 Signed-off-by: Igor Fedotov <[email protected]> (cherry picked from commit 9c958c6)
The previous addition of the `diff_mask` parameter to the snapdiff API altered the signature of `ceph_open_snapdiff` and affected the public `ceph_snapdiff_info` struct, breaking both API and ABI for downstream consumers (such as go-ceph). This commit restores the original v1 API and ABI to preserve backward compatibility. To support passing the `diff_mask` to the Client layer, this introduces a v2 API: - `ceph_open_snapdiff2` - `ceph_readdir_snapdiff2` - `ceph_close_snapdiff2` To future-proof the API, the v2 handle (`struct ceph_snapdiff_info2`) is declared as an opaque pointer in the public header. Internally, the v2 struct embeds the v1 struct to eliminate code duplication across the public endpoints. Fixes: https://tracker.ceph.com/issues/79154 Reported-by: Anoop C S <[email protected]> Introduced-by: 9c958c6 Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit 02436eb)
Updates the Cython bindings (`c_cephfs.pxd`, `mock_cephfs.pxi`, and `cephfs.pyx`) to support the new `ceph_open_snapdiff2` C API. Introduces a new `opensnapdiff2` method and a corresponding `SnapDiffHandle2` class to allow Python consumers to pass the `diff_mask` parameter. The original `opensnapdiff` and `SnapDiffHandle` implementations are left untouched to ensure backward compatibility for existing scripts. Fixes: https://tracker.ceph.com/issues/79154 Reported-by: Anoop C S <[email protected]> Introduced-by: 9c958c6 Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit 5777ca5)
The C++ `ceph_close_snapdiff2` (and its v1 version) function unconditionally deletes the allocated `ceph_snapdiff_info2` struct. Previously, if this function returned an error code, the Cython wrapper raised a Python exception before setting `self.opened = 0` and `self.handle = NULL`. Because the internal state remained "open" with a dangling pointer, Python's garbage collector would eventually trigger `__dealloc__`. This caused `close()` to be executed a second time on the already-freed pointer, resulting in a double-free segmentation fault. This commit fixes the issue by unconditionally updating the object's internal state to closed and nullifying the pointer before evaluating the return code and raising any exceptions. Caught by @anoopcs9 during review. Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit 4f067bb)
Update the libcephfs snapdiff test suite to validate both the restored v1 ABI and the newly introduced v2 API. - Introduced the `for_each_readdir_snapdiff2` helper to test the v2 API using the opaque `ceph_snapdiff_info_v2` struct and `diff_mask`. - Retained the original `for_each_readdir_snapdiff` helper to ensure the restored v1 API remains continuously tested for strict backward compatibility. - Updated `readdir_snapdiff_and_compare` to dynamically route to the v1 helper when `diff_mask == 0`, and to the v2 helper when a mask is actively being tested. - Python tests: Added coverage for the `opensnapdiff2` binding and `SnapDiffHandle2` iteration. Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit 4188bc7)
Updates the CephFS mirroring daemon to drop the `diff_mask` parameter and revert to using the standard `ceph_open_snapdiff` API. The mirror daemon does not use the new mask functionality righit now, it can safely rely on the restored v1 ABI. This resolves compilation and integration mismatches caused by the previous API breakage. cephfs-mirror will rely on v2 API in a separate change. Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit 29ba8b4)
Credit to @idryomov for noticing this. Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit b66c6a8)
Bump the libcephfs minor version to reflect the addition of the new snapdiff v2 APIs (ceph_open_snapdiff2, ceph_readdir_snapdiff2, and ceph_close_snapdiff2). Since these functions introduce new functionality to the public API while strictly maintaining backward compatibility with the existing v1 ABI, a minor version increment is required. The extra/patch version has been reset to 0. Signed-off-by: Venky Shankar <[email protected]> (cherry picked from commit da460f1) Conflicts: src/include/cephfs/libcephfs.h Fixup major/minor/extra version to be simimlar to main.
|
/audit retest |
|
🔄 Audit Retest Triggered by @vshankar. |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #72936 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 86a39c6 cephfs/snapdiff: introduce mask param for file attr changes | PR #68054 | 9c958c6 cephfs/snapdiff: introduce mask param for file attr changes |
| cdeea41 libcephfs: introduce snapdiff v2 API to fix ABI breakage | PR #70912 | 02436eb libcephfs: introduce snapdiff v2 API to fix ABI breakage |
| 1ae157e pybind/cephfs: implement support for snapdiff v2 API | 5777ca5 pybind/cephfs: implement support for snapdiff v2 API | |
| 0835192 pybind/cephfs: fix double-free in SnapDiffHandle[,2] close | 4f067bb pybind/cephfs: fix double-free in SnapDiffHandle[,2] close | |
| e758fb2 tests: add coverage for libcephfs snapdiff v2 API | 4188bc7 tests: add coverage for libcephfs snapdiff v2 API | |
| af00ee6 cephfs-mirror: revert to using snapdiff v1 API | 29ba8b4 cephfs-mirror: revert to using snapdiff v1 API | |
| c3cf989 mds: revert to dout(30) in Server::build_snap_diff() | b66c6a8 mds: revert to dout(30) in Server::build_snap_diff() | |
| b043358 libcephfs: bump minor version to 11.1.0 | da460f1 libcephfs: bump minor version to 11.1.0 |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport b043358 (cherry-pick of da460f1)
Affected File(s)
src/include/cephfs/libcephfs.h
Range Diff
Click to expand
--- Original (da460f13)
+++ Backport (b0433580)
@@ -10,3 +10,9 @@
has been reset to 0.
Signed-off-by: Venky Shankar <[email protected]>
+(cherry picked from commit da460f135ff817878a7f104e5b40221dac87d0e2)
+
+Conflicts:
+ src/include/cephfs/libcephfs.h
+
+Fixup major/minor/extra version to be simimlar to main.
================================================================================
RANGE DIFF
================================================================================
1: da460f135ff < -: ----------- libcephfs: bump minor version to 11.1.0
-: ----------- > 1: b0433580b8f libcephfs: bump minor version to 11.1.0How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
/audit override |
|
✅ Audit Override Applied by @vshankar. |
|
This PR has been added to wip-yuri5-testing-20261117.214518-squid. |
|
Removing this from (then Cython hits The backport adds Please backport the Removed labels: |
|
This PR has been removed from wip-yuri5-testing-20261117.214518-squid. |
Apologies. I will fix it up. |
backport tracker: https://tracker.ceph.com/issues/79064, https://tracker.ceph.com/issues/80286
backport of #68054
parent tracker: https://tracker.ceph.com/issues/75705
backport of #70912
parent tracker: https://tracker.ceph.com/issues/79154
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