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_REACQUIRE_REQUEST_H
5 #define CEPH_LIBRBD_MANAGED_LOCK_REACQUIRE_REQUEST_H
7 #include "include/rados/librados.hpp"
8 #include "include/int_types.h"
17 namespace managed_lock {
19 template <typename ImageCtxT>
20 class ReacquireRequest {
23 static ReacquireRequest *create(librados::IoCtx& ioctx,
24 const std::string& oid,
25 const std::string& old_cookie,
26 const std::string &new_cookie,
29 return new ReacquireRequest(ioctx, oid, old_cookie, new_cookie, exclusive,
33 ReacquireRequest(librados::IoCtx& ioctx, const std::string& oid,
34 const std::string& old_cookie,
35 const std::string &new_cookie, bool exclusive,
54 librados::IoCtx& m_ioctx;
56 std::string m_old_cookie;
57 std::string m_new_cookie;
62 void handle_set_cookie(int r);
66 } // namespace managed_lock
69 #endif // CEPH_LIBRBD_MANAGED_LOCK_REACQUIRE_REQUEST_H