Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
rbd: import real thin-provision image #12883
@dillaman , refine based on the comment. Also add it to ImportDiff.
So we add --sparse_size option into image_options or image_specs_options? But we also need to pass the sparse_size params into librbd::copy so that it becomes librbd::copy( .... , size_t sparse_size ＝ 0). is it reasonable?
@mslovy There is an existing tracker ticket for sparsifying the copy operation (http://tracker.ceph.com/issues/15648). If you work on it as part of this PR, please add the "Fixes: " to that commit. As for updating the API, unfortunately you cannot update existing API methods. You would need to add
Need some unit tests to verify that the sparse function actually works -- i.e. modify one or more of the tests under "qa/workunits/rbd" to exercise sparse import, import-diff, and copy functions.
I would like to see some test cases that actually demonstrate that the sparse size is being respected. For example, if you create an image with "--image-feature layering" and run "rbd disk-usage", it will give you an accurate usage. You could also compare the output from "rbd diff" to see that the diffs exactly match the non-zero extents.