#include "librbd/ExclusiveLock.h"
#include "librbd/ImageCtx.h"
#include "librbd/Utils.h"
+#include "librbd/asio/ContextWQ.h"
#include "librbd/exclusive_lock/Policy.h"
#include "librbd/io/AioCompletion.h"
#include "librbd/io/ImageDispatchSpec.h"
namespace exclusive_lock {
using util::create_context_callback;
+using util::create_async_context_callback;
template <typename I>
ImageDispatch<I>::ImageDispatch(I* image_ctx)
locker.unlock();
*dispatch_result = io::DISPATCH_RESULT_RESTART;
- auto ctx = create_context_callback<
- ImageDispatch<I>, &ImageDispatch<I>::handle_acquire_lock>(this);
+ auto ctx = create_async_context_callback(
+ *m_image_ctx, create_context_callback<
+ ImageDispatch<I>, &ImageDispatch<I>::handle_acquire_lock>(this));
m_image_ctx->exclusive_lock->acquire_lock(ctx);
return true;
}