From 77391b394e91bedc785381c8869b87902c4de4d1 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 30 Mar 2016 18:43:50 -0400 Subject: [PATCH] librados_test_stub: add new cls_cxx_read2/write2 methods Fixes: http://tracker.ceph.com/issues/15332 Signed-off-by: Jason Dillaman --- src/test/librados_test_stub/LibradosTestStub.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc index ad6b395199a2..7176ba470250 100644 --- a/src/test/librados_test_stub/LibradosTestStub.cc +++ b/src/test/librados_test_stub/LibradosTestStub.cc @@ -1118,6 +1118,11 @@ int cls_cxx_map_set_vals(cls_method_context_t hctx, int cls_cxx_read(cls_method_context_t hctx, int ofs, int len, bufferlist *outbl) { + return cls_cxx_read2(hctx, ofs, len, outbl, 0); +} + +int cls_cxx_read2(cls_method_context_t hctx, int ofs, int len, + bufferlist *outbl, uint32_t op_flags) { librados::TestClassHandler::MethodContext *ctx = reinterpret_cast(hctx); return ctx->io_ctx_impl->read(ctx->oid, len, ofs, outbl); @@ -1138,6 +1143,11 @@ int cls_cxx_stat(cls_method_context_t hctx, uint64_t *size, time_t *mtime) { int cls_cxx_write(cls_method_context_t hctx, int ofs, int len, bufferlist *inbl) { + return cls_cxx_write2(hctx, ofs, len, inbl, 0); +} + +int cls_cxx_write2(cls_method_context_t hctx, int ofs, int len, + bufferlist *inbl, uint32_t op_flags) { librados::TestClassHandler::MethodContext *ctx = reinterpret_cast(hctx); return ctx->io_ctx_impl->write(ctx->oid, *inbl, len, ofs, ctx->snapc); -- 2.47.3