]> git.proxmox.com Git - ceph.git/blame - ceph/src/tools/rbd_ggate/Driver.h
update sources to v12.1.3
[ceph.git] / ceph / src / tools / rbd_ggate / Driver.h
CommitLineData
d2e6a577
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#ifndef CEPH_RBD_GGATE_DRIVER_H
5#define CEPH_RBD_GGATE_DRIVER_H
6
7#include <list>
8#include <string>
9
10#include "ggate_drv.h"
11
12namespace rbd {
13namespace ggate {
14
15struct Request;
16
17class Driver {
18public:
19 static int load();
20 static int kill(const std::string &devname);
21 static int list(std::list<std::string> &devs);
22
23 Driver(const std::string &devname, size_t sectorsize, size_t mediasize,
24 bool readonly, const std::string &info);
25
26 int init();
27 void shut_down();
28
29 std::string get_devname() const;
30
31 int recv(Request **req);
32 int send(Request *req);
33
34 int resize(size_t newsize);
35
36private:
37 std::string m_devname;
38 size_t m_sectorsize;
39 size_t m_mediasize;
40 bool m_readonly;
41 std::string m_info;
42 ggate_drv_t m_drv = 0;
43};
44
45} // namespace ggate
46} // namespace rbd
47
48#endif // CEPH_RBD_GGATE_DRIVER_H
49