]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/cache/PassthroughImageCache.cc
update sources to v12.1.2
[ceph.git] / ceph / src / librbd / cache / PassthroughImageCache.cc
index f892387acc8922931df844f6e9d215482477e28c..5b22fc7a6ced33b3075e4669ff2d1bc6ab0db4a1 100644 (file)
@@ -76,6 +76,22 @@ void PassthroughImageCache<I>::aio_writesame(uint64_t offset, uint64_t length,
                                   on_finish);
 }
 
+template <typename I>
+void PassthroughImageCache<I>::aio_compare_and_write(Extents &&image_extents,
+                                                     bufferlist&& cmp_bl,
+                                                     bufferlist&& bl,
+                                                     uint64_t *mismatch_offset,
+                                                     int fadvise_flags,
+                                                     Context *on_finish) {
+  CephContext *cct = m_image_ctx.cct;
+  ldout(cct, 20) << "image_extents=" << image_extents << ", "
+                 << "on_finish=" << on_finish << dendl;
+
+  m_image_writeback.aio_compare_and_write(
+    std::move(image_extents), std::move(cmp_bl), std::move(bl), mismatch_offset,
+    fadvise_flags, on_finish);
+}
+
 template <typename I>
 void PassthroughImageCache<I>::init(Context *on_finish) {
   CephContext *cct = m_image_ctx.cct;