Implement bdev_lvol_start_deep_copy and bdev_lvol_check_deep_copy API#61
Conversation
bdev_lvol_start_deep_copy and bdev_lvol_check_deep_copy API
|
Still need to add some unit tests and code refinement but the logic is ready for reviewing |
|
At first glance, you should break each of these 2 commits into multiple commits, one for each layer (blob, lvol, vbdev_lvol, rpc). Every commit should have the corresponding unit test and the commit over the rpc layer (vbdev_lvol_rpc.c, lvol.py and rpc.py) should contain an e2e test. |
211d77e to
6eecaa4
Compare
|
Thanks @DamiaSan for the feedback. I am working on breaking down the commits and adding tests. In the mean time, the logic of the PR is ready for review. Thank you! |
1357f46 to
ab2a5cd
Compare
All completed Could you help to review @derekbit @DamiaSan @shuo-wu @c3y1huang ? Thank you |
ab2a5cd to
face4f9
Compare
These are detected by running scripts/check_format.sh Signed-off-by: Phan Le <phan.le@suse.com>
54420ca to
c807f55
Compare
Thanks @DamiaSan for the review. Should we contribute to upstream? |
derekbit
left a comment
There was a problem hiding this comment.
I will continue reviewing the PR later today. More on the error handling.
c807f55 to
4c08580
Compare
A deep copy will copy over the destination device the cluster allocated to the blob or blob's ancestors Signed-off-by: Phan Le <phan.le@suse.com>
This is mostly a wrapper around spdk_bs_blob_deep_copy(), but it also performs some checks over lvol, bs_dev and their compatibility. Signed-off-by: Phan Le <phan.le@suse.com>
This is mostly a wrapper around spdk_lvol_deep_copy(), but it also has the aim to create the spdk_bs_dev device from the given bdev. Signed-off-by: Phan Le <phan.le@suse.com>
Add RPC interface to start a deep copy of a read only lvol over a given bdev. Next patch will add another RPC to check the status of this operation. Signed-off-by: Phan Le <phan.le@suse.com>
Add RPC interface to get info about a deep copy operation, like the total number of clusters to be processed, the actual number of clusters processed and the result of the operation. Signed-off-by: Phan Le <phan.le@suse.com>
Added test to check deep copy and deep copy status behavior. Signed-off-by: Phan Le <phan.le@suse.com>
CHANGELOG.md, lvol.md and blob.md have been updated with informations about the deep copy functionality. Signed-off-by: Phan Le <phan.le@suse.com>
4c08580 to
2e0af6c
Compare
It would be a great thing. |
bdev_lvol_start_deep_copy: Start a deep copy of a lvol over a given bdevbdev_lvol_check_deep_copy: Get deep copy statuslonghorn/longhorn#7794