utilities/env_librados: copy use bufferlist::iterator (#6395)

Summary:
to adapt the change in ceph upstream where the bufferlist::copy() method
was removed in
c724369010

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
This commit is contained in:
Kefu Chai 2020-02-10 11:29:58 -08:00 committed by Facebook Github Bot
parent 84b41a6969
commit debc4ef18b

View 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 {