]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/osd/RadosModel.cc
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / test / osd / RadosModel.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #include "include/interval_set.h"
4 #include "include/buffer.h"
5 #include <list>
6 #include <map>
7 #include <set>
8 #include "include/rados/librados.h"
9 #include "RadosModel.h"
10 #include "TestOpStat.h"
11
12
13 void TestOp::begin()
14 {
15 //if (stat) stat->begin(this);
16 _begin();
17 }
18
19 void TestOp::finish(TestOp::CallbackInfo *info)
20 {
21 _finish(info);
22 //if (stat && finished()) stat->end(this);
23 }
24
25 void read_callback(librados::completion_t comp, void *arg) {
26 TestOp* op = static_cast<TestOp*>(arg);
27 op->finish(NULL);
28 }
29
30 void write_callback(librados::completion_t comp, void *arg) {
31 std::pair<TestOp*, TestOp::CallbackInfo*> *args =
32 static_cast<std::pair<TestOp*, TestOp::CallbackInfo*> *>(arg);
33 TestOp* op = args->first;
34 TestOp::CallbackInfo *info = args->second;
35 op->finish(info);
36 delete args;
37 delete info;
38 }