1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_MANAGED_LOCK_RELEASE_REQUEST_H
5 #define CEPH_LIBRBD_MANAGED_LOCK_RELEASE_REQUEST_H
7 #include "include/rados/librados.hpp"
8 #include "librbd/watcher/Types.h"
18 namespace managed_lock {
20 template <typename ImageCtxT>
21 class ReleaseRequest {
23 typedef watcher::Traits<ImageCtxT> TypeTraits;
24 typedef typename TypeTraits::Watcher Watcher;
27 static ReleaseRequest* create(librados::IoCtx& ioctx, Watcher *watcher,
28 ContextWQ *work_queue,
29 const std::string& oid,
30 const std::string& cookie,
51 ReleaseRequest(librados::IoCtx& ioctx, Watcher *watcher,
52 ContextWQ *work_queue, const std::string& oid,
53 const std::string& cookie, Context *on_finish);
55 librados::IoCtx& m_ioctx;
62 void handle_unlock(int r);
68 } // namespace managed_lock
71 #endif // CEPH_LIBRBD_MANAGED_LOCK_RELEASE_REQUEST_H