X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Ftest%2Flibrbd%2Fmock%2Fcache%2FMockImageCache.h;h=473f7c8a8b8495830a48aa897c82fd5875f9e8c4;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=8c5624c8659ffe0d445ab88d88fdbc56d34d846b;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/src/test/librbd/mock/cache/MockImageCache.h b/ceph/src/test/librbd/mock/cache/MockImageCache.h index 8c5624c86..473f7c8a8 100644 --- a/ceph/src/test/librbd/mock/cache/MockImageCache.h +++ b/ceph/src/test/librbd/mock/cache/MockImageCache.h @@ -36,6 +36,18 @@ struct MockImageCache { int fadvise_flags, Context *on_finish) { aio_writesame_mock(off, len, bl, fadvise_flags, on_finish); } + + MOCK_METHOD6(aio_compare_and_write_mock, void(const Extents &, + const ceph::bufferlist &, + const ceph::bufferlist &, + uint64_t *, int, Context *)); + + void aio_compare_and_write(Extents&& image_extents, ceph::bufferlist&& cmp_bl, + ceph::bufferlist&& bl, uint64_t *mismatch_offset, + int fadvise_flags, Context *on_finish) { + aio_compare_and_write_mock(image_extents, cmp_bl, bl, mismatch_offset, + fadvise_flags, on_finish); + } }; } // namespace cache