]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/journal: use librados::IoCtx reference for helper state machines
authorJason Dillaman <dillaman@redhat.com>
Wed, 19 Oct 2016 20:25:46 +0000 (16:25 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 31 Oct 2016 14:57:14 +0000 (10:57 -0400)
This facilitates being able to properly mock test cases around journal
cls method calls.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/cls/journal/cls_journal_client.cc

index 89baab8c698c8e75650a41dabef45f08d552f3fa..8d25dee647943a0d0d58f768936a6029e11607cc 100644 (file)
@@ -15,11 +15,11 @@ namespace client {
 namespace {
 
 struct C_AioExec : public Context {
-  librados::IoCtx ioctx;
+  librados::IoCtx &ioctx;
   std::string oid;
 
-  C_AioExec(librados::IoCtx &_ioctx, const std::string &_oid) : oid(_oid) {
-    ioctx.dup(_ioctx);
+  C_AioExec(librados::IoCtx &_ioctx, const std::string &_oid)
+    : ioctx(_ioctx), oid(_oid) {
   }
 
   static void rados_callback(rados_completion_t c, void *arg) {