# /root/ceph/src/github.com/ceph/go-ceph/rbd/rbd.go 中添加以下内容#引入 ceph 获取 rbd 变化的函数 rbd_diff_iterate 同时实现该函数的回调函数 diff_callback/*int diff_callback(uint64_t offset,size_t len,int exists,void *arg) {size_t *used_size = (size_t *)(arg);if (exists){(*...
test/librbd: refactor DiffIterateTest.DiffIterateDeterministic{,PP} … 1df8799 test/librbd: extend DiffIterateTest.DiffIterateDeterministic{,PP} … da69d1f idryomov added the bug-fix label Jun 22, 2024 idryomov requested a review from a team as a code owner June 22, 2024 16:11...
CEPH_RBD_API int rbd_diff_iterate(rbd_image_t image, const char *fromsnapname, uint64_t ofs, uint64_t len, int (*cb)(uint64_t, size_t, int, void *), void *arg); CEPH_RBD_API int rbd_diff_iterate2(rbd_image_t image, const char *fromsnapname, uint64_t ofs, uint64_t ...
You could have canonical names for the libvirt snapshots like you suggest, 'libvirt-', and check via rbd_diff_iterate2() whether the parent image changed since the last snapshot. That's a bit slower than plain cloning, but with object map + fast diff it's fast again, since it doesn...
# /root/ceph/src/github.com/ceph/go-ceph/rbd/rbd.go 中添加以下内容 #引入 ceph 获取 rbd 变化的函数 rbd_diff_iterate 同时实现该函数的回调函数 diff_callback /* int diff_callback(uint64_t offset,size_t len,int exists,void *arg) { size_t *used_size = (size_t *)(arg); if (exist...
diff_iterate(self,offset,length,from_snapshot,iterate_cb,include_parent=True,whole_object=False) Iterate over the changed extents of an image. This will call iterate_cb with three arguments: (offset, length, exists) where the changed extent starts at offset bytes, continues for length bytes, ...
#引入 ceph 获取 rbd 变化的函数 rbd_diff_iterate 同时实现该函数的回调函数 diff_callback /* int diff_callback(uint64_t offset,size_t len,int exists,void *arg) { size_t *used_size = (size_t *)(arg); if (exists){ (*used_size) +=len; } return 0; } int rbd_allocation(rbd_ima...
RBD_DIFF_CB = CFUNCTYPE(c_int, c_uint64, c_size_t, c_int, c_void_p) cb_holder = DiffIterateCB(iterate_cb) cb = RBD_DIFF_CB(cb_holder.callback) ret = self.librbd.rbd_diff_iterate(self.image, c_char_p(from_snapshot), ...
export-diff [image-name] [dest-path] [--from-snap snapname] Exports an incremental diff for an image to dest path (use - for stdout). If an initial snapshot is specified, only changes since that snapshot are included; otherwise, any regions of the image that contain data are included...
The --export-format accepts ‘1’ or ‘2’ currently. Format 2 allow us to export not only the content of image, but also the snapshots and other properties, such as image_order, features. export-diff [--from-snap snap-name] [--whole-object] (image-spec | snap-spec) dest-path ...