librbd notification race condition on snap_create
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
}
unlock();
+ return true;
}
- void ImageWatcher::finalize_header_update() {
- librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
- &m_image_ctx);
- }
-
void ImageWatcher::assert_header_locked(librados::ObjectWriteOperation *op) {
rados::cls::lock::assert_locked(op, RBD_LOCK_NAME, LOCK_EXCLUSIVE,
encode_lock_cookie(), WATCHER_LOCK_TAG);
int get_lock_owner_info(entity_name_t *locker, std::string *cookie,
std::string *address, uint64_t *handle);
int lock();
- void release_lock();
+ bool release_lock();
bool try_request_lock();
- void finalize_header_update();
void schedule_retry_aio_requests(bool use_timer);
void retry_aio_requests();