]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
utilities/env_librados: copy use bufferlist::iterator (#6395) ceph-octopus-v5.8-1436
authorKefu Chai <tchaikov@gmail.com>
Mon, 10 Feb 2020 19:29:58 +0000 (11:29 -0800)
committerBrad Hubbard <bhubbard@redhat.com>
Wed, 13 May 2020 06:00:34 +0000 (16:00 +1000)
Summary:
to adapt the change in ceph upstream where the bufferlist::copy() method
was removed in
https://github.com/ceph/ceph/commit/c724369010a753bd44e11a534d1f42156c4fc12d

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6395

Differential Revision: D19816815

Pulled By: zhichao-cao

fbshipit-source-id: 9210767b91af0ecdcf5dfaa3e70edcaeea55135f
(cherry picked from commit debc4ef18b2e61581ca81dc7fc997b085eb015d9)

utilities/env_librados.cc

index 753444da16a105287ce60e0d0ec30bdb3093b48f..8c35bece6389ff542d892221e295302dfefc0668 100644 (file)
@@ -127,7 +127,7 @@ public:
     Status s;
     int r = _io_ctx->read(_fid, buffer, n, _offset);
     if (r >= 0) {
-      buffer.copy(0, r, scratch);
+      buffer.begin().copy(r, scratch);
       *result = Slice(scratch, r);
       _offset += r;
       s = Status::OK();
@@ -205,7 +205,7 @@ public:
     Status s;
     int r = _io_ctx->read(_fid, buffer, n, offset);
     if (r >= 0) {
-      buffer.copy(0, r, scratch);
+      buffer.begin().copy(r, scratch);
       *result = Slice(scratch, r);
       s = Status::OK();
     } else {