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:
parent
84b41a6969
commit
debc4ef18b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user