rbd_diff_iterate

Function rbd_diff_iterate 

Source
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(arg1: uint64_t, arg2: size_t, arg3: c_int, arg4: *mut c_void) -> c_int>,
    arg: *mut c_void,
) -> c_int
Expand description

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 NULL
  • ofs start offset
  • len len in bytes of region to report on
  • cb callback to call for each allocated region
  • arg argument to pass to the callback @returns 0 on success, or negative error code on error