]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
obj_bencher: changed interface
authorYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 27 Apr 2012 00:03:29 +0000 (17:03 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 4 May 2012 22:53:27 +0000 (15:53 -0700)
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 <yehuda@hq.newdream.net>
src/common/obj_bencher.h
src/rados.cc
src/tools/rest_bench.cc

index 0a2ea583b383cc46ba85284eca4dfebbeddafddb..d4105274d0e74b3e6698487ec8c8bcb684efba2c 100644 (file)
@@ -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:
index 3e985b96fa4ac55b09adf3572762fadf7f9c7011..526a9e4e314d93d6faae4fcc496e9864e95509fc 100644 (file)
@@ -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);
   }
 
index f6bdc090241e8b0fde8eae3eed0fd30ef22c6c93..05cda32c8d6862fd7631718526e6a782f082fc8e 100644 (file)
@@ -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();