]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/managed_lock/GetLockerRequest.h
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_GET_LOCKER_REQUEST_H
5 #define CEPH_LIBRBD_MANAGED_LOCK_GET_LOCKER_REQUEST_H
7 #include "include/int_types.h"
8 #include "include/buffer.h"
12 namespace librados
{ class IoCtx
; }
18 namespace managed_lock
{
22 template <typename ImageCtxT
= ImageCtx
>
23 class GetLockerRequest
{
25 static GetLockerRequest
* create(librados::IoCtx
& ioctx
,
26 const std::string
& oid
, bool exclusive
,
27 Locker
*locker
, Context
*on_finish
) {
28 return new GetLockerRequest(ioctx
, oid
, exclusive
, locker
, on_finish
);
34 librados::IoCtx
&m_ioctx
;
43 GetLockerRequest(librados::IoCtx
& ioctx
, const std::string
& oid
,
44 bool exclusive
, Locker
*locker
, Context
*on_finish
);
46 void send_get_lockers();
47 void handle_get_lockers(int r
);
53 } // namespace managed_lock
56 extern template class librbd::managed_lock::GetLockerRequest
<librbd::ImageCtx
>;
58 #endif // CEPH_LIBRBD_MANAGED_LOCK_GET_LOCKER_REQUEST_H