Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / test / bench / rados_backend.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2
3 #ifndef RADOSBACKENDH
4 #define RADOSBACKENDH
5
6 #include "backend.h"
7 #include "include/Context.h"
8 #include "include/rados/librados.hpp"
9
10 class RadosBackend : public Backend {
11   librados::IoCtx *ioctx;
12 public:
13   explicit RadosBackend(
14     librados::IoCtx *ioctx)
15     : ioctx(ioctx) {}
16   void write(
17     const string &oid,
18     uint64_t offset,
19     const bufferlist &bl,
20     Context *on_applied,
21     Context *on_commit) override;
22
23   void read(
24     const string &oid,
25     uint64_t offset,
26     uint64_t length,
27     bufferlist *bl,
28     Context *on_complete) override;
29 };
30
31 #endif