Function librbd_sys::rbd_lock_shared [] [src]

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

Take a shared lock on the image.

Other clients may also take a shared lock, as lock as they use the same tag.

Arguments

  • image the image to lock
  • cookie user-defined identifier for this instance of the lock
  • tag user-defined identifier for this shared use 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