From: Sage Weil Date: Tue, 24 Jan 2017 16:11:49 +0000 (-0500) Subject: os/bluestore/BlockDevice: allow sync read to accumulate on bl X-Git-Tag: v12.0.0~52^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aca26825dd2d0d85ae463d3593b57a2aadc6e663;p=ceph.git os/bluestore/BlockDevice: allow sync read to accumulate on bl Do not clear the target bl; instead, append to it. This makes our behavior consistent with aio_read, which does the same. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index 7ffd6fd91f7b..3690f761fb60 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -539,7 +539,6 @@ int KernelDevice::read(uint64_t off, uint64_t len, bufferlist *pbl, goto out; } assert((uint64_t)r == len); - pbl->clear(); pbl->push_back(std::move(p)); dout(40) << "data: "; diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 2f7731422312..13011580d05d 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -934,7 +934,6 @@ int NVMEDevice::read(uint64_t off, uint64_t len, bufferlist *pbl, while (t->return_code > 0) ioc->cond.wait(l); } - pbl->clear(); pbl->push_back(std::move(p)); r = t->return_code; delete t;