Merge pull request #33057 from wjwithagen/wjw-fix-buffer.copy

rbd-ggate: fix fallout from bufferlist.copy() change

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-02-05 11:15:37 +08:00 committed by GitHub
commit d41d53be87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,7 +149,7 @@ int Driver::send(Request *req) {
ggate_drv_req_error(req->req) == 0) {
ceph_assert(req->bl.length() == ggate_drv_req_length(req->req));
// TODO: avoid copying?
req->bl.copy(0, ggate_drv_req_length(req->req),
req->bl.begin().copy(ggate_drv_req_length(req->req),
static_cast<char *>(ggate_drv_req_buf(req->req)));
dout(20) << "copied resulting " << req->bl.length() << " bytes to "
<< ggate_drv_req_buf(req->req) << dendl;