summaryrefslogtreecommitdiffstats
path: root/src/test/librados_test_stub
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2019-10-29 18:14:39 +0100
committerKefu Chai <kchai@redhat.com>2019-11-01 10:27:21 +0100
commitc25b5a0d643a75f63828f5b4e9f5e45d9914525e (patch)
tree8bede475ab696dcb62f95805bfa125ee70ae52db /src/test/librados_test_stub
parentlibrbd: use new aio_create_completion() (diff)
downloadceph-c25b5a0d643a75f63828f5b4e9f5e45d9914525e.tar.xz
ceph-c25b5a0d643a75f63828f5b4e9f5e45d9914525e.zip
test/librados_test_stub: implement aio_create_completion2() and friends
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/test/librados_test_stub')
-rw-r--r--src/test/librados_test_stub/LibradosTestStub.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc
index c4345fcc5f4..be7af75e4a2 100644
--- a/src/test/librados_test_stub/LibradosTestStub.cc
+++ b/src/test/librados_test_stub/LibradosTestStub.cc
@@ -116,18 +116,14 @@ librados::TestRadosClient *create_rados_client() {
} // anonymous namespace
-extern "C" int rados_aio_create_completion(void *cb_arg,
- rados_callback_t cb_complete,
- rados_callback_t cb_safe,
- rados_completion_t *pc)
+extern "C" int rados_aio_create_completion2(void *cb_arg,
+ rados_callback_t cb_complete,
+ rados_completion_t *pc)
{
librados::AioCompletionImpl *c = new librados::AioCompletionImpl;
if (cb_complete) {
c->set_complete_callback(cb_arg, cb_complete);
}
- if (cb_safe) {
- c->set_safe_callback(cb_arg, cb_safe);
- }
*pc = c;
return 0;
}
@@ -1005,10 +1001,9 @@ void Rados::from_rados_t(rados_t p, Rados &rados) {
}
AioCompletion *Rados::aio_create_completion(void *cb_arg,
- callback_t cb_complete,
- callback_t cb_safe) {
+ callback_t cb_complete) {
AioCompletionImpl *c;
- int r = rados_aio_create_completion(cb_arg, cb_complete, cb_safe,
+ int r = rados_aio_create_completion2(cb_arg, cb_complete,
reinterpret_cast<void**>(&c));
ceph_assert(r == 0);
return new AioCompletion(c);