From: Yehuda Sadeh Date: Fri, 27 Apr 2012 00:03:29 +0000 (-0700) Subject: obj_bencher: changed interface X-Git-Tag: v0.47~23^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f60444fbebd21c8ba43c0a0e44e571baa70a0ff7;p=ceph.git obj_bencher: changed interface Passing bufferlist and not const bufferlist in aio_write(). We assign it to another object which is not const, and it doesn't work too well. Signed-off-by: Yehuda Sadeh --- diff --git a/src/common/obj_bencher.h b/src/common/obj_bencher.h index 0a2ea583b383..d4105274d0e7 100644 --- a/src/common/obj_bencher.h +++ b/src/common/obj_bencher.h @@ -59,7 +59,7 @@ protected: virtual int completion_ret(int slot) = 0; virtual int aio_read(const std::string& oid, int slot, bufferlist *pbl, size_t len) = 0; - virtual int aio_write(const std::string& oid, int slot, const bufferlist& bl, size_t len) = 0; + virtual int aio_write(const std::string& oid, int slot, bufferlist& bl, size_t len) = 0; virtual int sync_read(const std::string& oid, bufferlist& bl, size_t len) = 0; virtual int sync_write(const std::string& oid, bufferlist& bl, size_t len) = 0; public: diff --git a/src/rados.cc b/src/rados.cc index 3e985b96fa4a..526a9e4e314d 100644 --- a/src/rados.cc +++ b/src/rados.cc @@ -609,7 +609,7 @@ protected: return io_ctx.aio_read(oid, completions[slot], pbl, len, 0); } - int aio_write(const std::string& oid, int slot, const bufferlist& bl, size_t len) { + int aio_write(const std::string& oid, int slot, bufferlist& bl, size_t len) { return io_ctx.aio_write(oid, completions[slot], bl, len, 0); } diff --git a/src/tools/rest_bench.cc b/src/tools/rest_bench.cc index f6bdc090241e..05cda32c8d68 100644 --- a/src/tools/rest_bench.cc +++ b/src/tools/rest_bench.cc @@ -385,7 +385,7 @@ protected: return 0; } - int aio_write(const std::string& oid, int slot, const bufferlist& bl, size_t len) { + int aio_write(const std::string& oid, int slot, bufferlist& bl, size_t len) { struct req_context *ctx = completions[slot]; ctx->get();