mirror of
https://github.com/ceph/go-ceph
synced 2024-12-24 07:03:00 +00:00
9841283344
The DiffIterate call accepts a data structure argument containing the parameters of the image to "diff" and a callback function. This callback is called in the C code, making use of the recently added callbacks helper. The callback itself is called with the offset and length of the differing area in the image as well as a data parameter so that a common function can distinguish or update different data for different calls if needed (compare to a void* in C). Signed-off-by: John Mulligan <jmulligan@redhat.com>
14 lines
273 B
Go
14 lines
273 B
Go
package rbd
|
|
|
|
/*
|
|
|
|
#include <rbd/librbd.h>
|
|
|
|
extern int diffIterateCallback(uint64_t ofs, size_t len, int exists, int index);
|
|
|
|
int callDiffIterateCallback(uint64_t ofs, size_t len, int exists, int index) {
|
|
return diffIterateCallback(ofs, len, exists, index);
|
|
}
|
|
*/
|
|
import "C"
|