-
Notifications
You must be signed in to change notification settings - Fork 264
rbd: add support for rbd_diff_iterate3 api #1064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hey, Please take a look at the function name and the way it is defined. The new api will be added in this pr https://github.com/ceph/ceph/pull/60844/files#diff-b4983d99df0348718f7db5606f7ee3ca00fb0e7a87b4a69740f7ada6dd283856 @nixpanic @ansiwen @phlogistonjohn @anoopcs9 Thanks, |
888be53
to
402c41b
Compare
@Rakshith-R please take a look at the test failures as they seem related to the change. Thanks! |
Yes, the tests are expected to fail for now. I Just added the pr early so I can get feedback on naming conventions and format. |
OK, as a general request - not specifically to you but to all contributors that are adding APIs to go-ceph that do not have a functioning versions in ceph - please make it very clear up front that the work is not complete in ceph. (Edit: a sentence or two in the descrition is good, even better if it includes links to Issues, PRs or design docs) In addition, I would like to see PRs of this sort be in Today, I'll make these changes to the PR after I submit this comment. In the future please consider these suggestions for PRs like this that can't be merged because work in ceph is still pending. Thanks! |
Noted, I'll keep these points in mind. |
This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏 |
46ecb45
to
11cba54
Compare
|
1df220a
to
fd4df17
Compare
Hey @phlogistonjohn @nixpanic @idryomov , The ceph pr has now been merged ceph/ceph#60844 . I have updated code to include the new flags format. The tests passes successfully on main branch
I am not sure how to handle fetching these enums without breaking previous release branches. Thanks |
Right, obviously that's not something we can accept in the current form. Normally, I would be advocating using build tags here, but you're using the new dlsym stuff. I think this is a significant downside to the dlsym appraoch as things like enums and macros don't have symbols to look up. I'm trying to avoid the urge to re-argue the dlsym stuff and just brainstorm a possible way forward. I see the values you are looking for are enums, which if memory serves won't be something we can if-def. There is a
Another, simpler approach would be to simply copy-paste the values from the C header into consts in the Go code. Less elegant perhaps but maybe more robust and understandable. If you do go that route please put a comment explaining the reason for the copy-paste. Neither of these future proof you for the case of new values appearing in the enum but I'll answer that in the more appropriate location. |
b4d4626
to
6f64f75
Compare
fdb6f8d
to
0924902
Compare
Rebased on top of latest master branch |
|
4 similar comments
|
|
|
|
I confirmed that the checklist items are taken care of. In the future, please don't just ignore the checklist - it helps me know that each item was considered and either followed or we had a discussion about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0924902
to
7a572b7
Compare
This commit adds support for rbd_diff_iterate3 through DiffIterateByID() which performs diff interate using snapshot id instead of snapshot name. This is useful in cases such as when rbd snapshot is in trash or rbd(group) snapshot in in group namespace. refer: - https://tracker.ceph.com/issues/65720 Signed-off-by: Rakshith R <rar@redhat.com>
7a572b7
to
b5e1ce4
Compare
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Mergifyio rebase |
☑️ Nothing to do
|
@Mergifyio refresh |
✅ Pull request refreshed |
@phlogistonjohn I just was researching for this command, but when I came back you were quicker... ;-) |
FWIW it was not just that command I also had to edit the description to remove |
This commit adds support for rbd_diff_iterate3
through DiffIterateByID() which performs
diff interate using snapshot id instead of
snapshot name.
This is useful in cases such as when rbd snapshot is in trash or rbd(group) snapshot in in group namespace.
refer:
Related ceph PR: ceph/ceph#60844
Checklist
//go:build ceph_preview
make api-update
to record new APIsNew or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.
The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with
@Mergifyio
rebase
to rebase your PR when github indicates that the PR is out of date with the base branch.