Function librbd_sys::rbd_lock_exclusive [] [src]

pub unsafe extern "C" fn rbd_lock_exclusive(
    image: rbd_image_t,
    cookie: *const c_char
) -> c_int

Take an exclusive lock on the image.

Arguments

  • image the image to lock
  • cookie user-defined identifier for this instance of the lock @returns 0 on success, negative error code on failure @returns -EBUSY if the lock is already held by another (client, cookie) pair @returns -EEXIST if the lock is already held by the same (client, cookie) pair