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
rbd: allow importing/exporting block devices #49358
base: main
Are you sure you want to change the base?
Conversation
57ba778
to
d10ad76
Compare
Wasn't sure whether to mark this as a bug or as a feature. We used to have this debate in Openstack and Nova cores usually said that if a patch enables a feature that never worked before, it's considered a feature and not a bug fix. |
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
d10ad76
to
789994a
Compare
jenkins test windows |
I don't see anything special about this command -- it seems to be exporting to a regular file? |
789994a
to
660af4f
Compare
Indeed, initially I was thinking about showcasing a block device but it probably doesn't really make sense to export a diff to a raw block device. I'll address the remaining comments ASAP. |
660af4f
to
b340627
Compare
b340627
to
fc591bc
Compare
jenkins test make check |
jenkins test windows |
jenkins test api |
From core PR scrub: the change in common isn't interesting from the core's PoV. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
fc591bc
to
a5d6cf9
Compare
jenkins test make check |
1 similar comment
jenkins test make check |
@idryomov this PR already went through a round of reviews, do you think we can get it in? |
The workunit isn't wired up (i.e. wouldn't actually run), so that would need to be fixed at the very least. I'll try to do another pass sometime this week or early next week. |
a5d6cf9
to
1cea209
Compare
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.
I'll have more comments on the workunit, but wanted to get clarity on the use cases for exporting and some semantics first.
f68ff0a
to
6d8174b
Compare
jenkins test make check |
@idryomov Thanks for reviewing this patch, please let me know if there's anything else that needs to be updated. |
6d8174b
to
0758ddb
Compare
8cd6122
to
9e8d6f6
Compare
I've prepared some Windows tests as well: That commit is based on another PR, which breaks the Windows Python tests into separate modules and makes the code reusable: #52560. I think I'll wait for this PR to merge and then I'll submit the Windows export tests there. |
This change checks if we're exporting to or importing from a block device. If so, we have to: * ensure that writes are sector aligned (Windows) * ensure that writes are not skipped in case of zero buffers * avoid fstat, use blkdev.get_size to retrieve the disk size (DeviceIoControl on Windows) * avoid ftruncate * avoid opening with O_CREAT | O_EXCL The import/export test is updated to cover block devices as well. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
9e8d6f6
to
73dcb83
Compare
jenkins test make check arm64 |
1 similar comment
jenkins test make check arm64 |
@idryomov I've addressed the comments and squashed the commits, I think it's ready to merge. Thanks again for the review. |
jenkins test make check arm64 |
rbd: allow importing/exporting block devices
This change checks if we're exporting to or importing from a block device. If so, we have to:
This enables to do the following:
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
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