From debc4ef18b2e61581ca81dc7fc997b085eb015d9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 10 Feb 2020 11:29:58 -0800 Subject: [PATCH] utilities/env_librados: copy use bufferlist::iterator (#6395) 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 Pull Request resolved: https://github.com/facebook/rocksdb/pull/6395 Differential Revision: D19816815 Pulled By: zhichao-cao fbshipit-source-id: 9210767b91af0ecdcf5dfaa3e70edcaeea55135f --- utilities/env_librados.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/env_librados.cc b/utilities/env_librados.cc index 7ecfd6d3e..73482ac6a 100644 --- a/utilities/env_librados.cc +++ b/utilities/env_librados.cc @@ -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 {