diff --git a/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc b/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc index 9367ed6dfa9..35b6863098b 100644 --- a/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc @@ -141,6 +141,9 @@ void OpenLocalImageRequest::send_lock_image() { return; } + // disallow any proxied maintenance operations before grabbing lock + (*m_local_image_ctx)->exclusive_lock->block_requests(-EROFS); + Context *ctx = create_context_callback< OpenLocalImageRequest, &OpenLocalImageRequest::handle_lock_image>( this);