From: Radoslaw Zarzynski Date: Tue, 23 Oct 2018 13:51:09 +0000 (+0200) Subject: client: create buffer::ptr_node directly. X-Git-Tag: v14.1.0~721^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=763fec49301cdd1bb428e983057f6c814392ee48;p=ceph.git client: create buffer::ptr_node directly. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/client/Client.cc b/src/client/Client.cc index a1a0866c3472..32cf5b0c2706 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -9255,7 +9255,7 @@ int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl, int64_t some = in->size - pos; if (some > left) some = left; - bufferptr z(some); + auto& z = buffer::ptr_node::create(some); z.zero(); bl->push_back(z); read += some; @@ -13174,10 +13174,10 @@ int Client::ll_write_block(Inode *in, uint64_t blockid, } object_t oid = file_object_t(vino.ino, blockid); SnapContext fakesnap; - bufferptr bp; - if (length > 0) bp = buffer::copy(buf, length); - bufferlist bl; - bl.push_back(bp); + ceph::bufferlist bl; + if (length > 0) { + bl.push_back(buffer::copy(buf, length)); + } ldout(cct, 1) << "ll_block_write for " << vino.ino << "." << blockid << dendl;