/* exclusive lock feature */
CEPH_RBD_API int rbd_is_exclusive_lock_owner(rbd_image_t image, int *is_owner);
+/* object map feature */
+CEPH_RBD_API int rbd_rebuild_object_map(rbd_image_t image,
+ librbd_progress_fn_t cb, void *cbdata);
+
CEPH_RBD_API int rbd_copy(rbd_image_t image, rados_ioctx_t dest_io_ctx,
const char *destname);
CEPH_RBD_API int rbd_copy2(rbd_image_t src, rbd_image_t dest);
/* exclusive lock feature */
int is_exclusive_lock_owner(bool *is_owner);
+ /* object map feature */
+ int rebuild_object_map(ProgressContext &prog_ctx);
+
int copy(IoCtx& dest_io_ctx, const char *destname);
int copy2(Image& dest);
int copy_with_progress(IoCtx& dest_io_ctx, const char *destname,
return r;
}
+ int Image::rebuild_object_map(ProgressContext &prog_ctx)
+ {
+ ImageCtx *ictx = reinterpret_cast<ImageCtx*>(ctx);
+ return librbd::rebuild_object_map(ictx, prog_ctx);
+ }
+
int Image::copy(IoCtx& dest_io_ctx, const char *destname)
{
ImageCtx *ictx = (ImageCtx *)ctx;
return r;
}
+extern "C" int rbd_rebuild_object_map(rbd_image_t image,
+ librbd_progress_fn_t cb, void *cbdata)
+{
+ librbd::ImageCtx *ictx = reinterpret_cast<librbd::ImageCtx*>(image);
+ librbd::CProgressContext prog_ctx(cb, cbdata);
+ return librbd::rebuild_object_map(ictx, prog_ctx);
+}
+
/* snapshots */
extern "C" int rbd_snap_create(rbd_image_t image, const char *snap_name)
{