]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cls/rbd: provide async version of copyup method
authorMykola Golub <mgolub@suse.com>
Tue, 7 May 2019 05:40:28 +0000 (06:40 +0100)
committerMykola Golub <mgolub@suse.com>
Thu, 9 May 2019 17:19:21 +0000 (18:19 +0100)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/cls/rbd/cls_rbd_client.cc
src/cls/rbd/cls_rbd_client.h

index 1e03fbce01bc9736d198cba3e8502dd860afde2a..4f2b3f510aac6d0271f26bcaec97fe44484cb0ab 100644 (file)
@@ -833,10 +833,16 @@ int get_all_features(librados::IoCtx *ioctx, const std::string &oid,
   return get_all_features_finish(&it, all_features);
 }
 
+void copyup(librados::ObjectWriteOperation *op, bufferlist data) {
+  op->exec("rbd", "copyup", data);
+}
+
 int copyup(librados::IoCtx *ioctx, const std::string &oid,
            bufferlist data) {
-  bufferlist out;
-  return ioctx->exec(oid, "rbd", "copyup", data, out);
+  librados::ObjectWriteOperation op;
+  copyup(&op, data);
+
+  return ioctx->operate(oid, &op);
 }
 
 void sparse_copyup(librados::ObjectWriteOperation *op,
index d9a01acd110559c93b8f5cfbec76184bf9cb5157..3ff6f32caa30b25b79c549e08e46cce2579d6445 100644 (file)
@@ -597,6 +597,7 @@ void assert_snapc_seq(librados::ObjectWriteOperation *op,
                       uint64_t snapc_seq,
                       cls::rbd::AssertSnapcSeqState state);
 
+void copyup(librados::ObjectWriteOperation *op, bufferlist data);
 int copyup(librados::IoCtx *ioctx, const std::string &oid,
            bufferlist data);