Function librbd_sys::rbd_diff_iterate
[−]
[src]
pub unsafe extern "C" fn rbd_diff_iterate(
image: rbd_image_t,
fromsnapname: *const c_char,
ofs: uint64_t,
len: uint64_t,
cb: Option<unsafe extern "C" fn(_: uint64_t, _: size_t, _: c_int, _: *mut c_void) -> c_int>,
arg: *mut c_void
) -> c_int
get difference between two versions of an image
This will return the differences between two versions of an image via a callback, which gets the offset and length and a flag indicating whether the extent exists (1), or is known/defined to be zeros (a hole, 0). If the source snapshot name is NULL, we interpret that as the beginning of time and return all allocated regions of the image. The end version is whatever is currently selected for the image handle (either a snapshot or the writeable head).
Arguments
fromsnapname
start snapshot name, or NULLofs
start offsetlen
len in bytes of region to report oncb
callback to call for each allocated regionarg
argument to pass to the callback @returns 0 on success, or negative error code on error