]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlockDevice: allow sync read to accumulate on bl
authorSage Weil <sage@redhat.com>
Tue, 24 Jan 2017 16:11:49 +0000 (11:11 -0500)
committerSage Weil <sage@redhat.com>
Fri, 27 Jan 2017 15:27:04 +0000 (10:27 -0500)
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 <sage@redhat.com>
src/os/bluestore/KernelDevice.cc
src/os/bluestore/NVMEDevice.cc

index 7ffd6fd91f7b1876a43a5ae415fd5922a30cd269..3690f761fb607fda7690cecdb2ce9fb918af88d5 100644 (file)
@@ -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: ";
index 2f77314223126f4bccfe598c52fe4ed7be97331c..13011580d05dc940299d92d2911b6fb812bd38ba 100644 (file)
@@ -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;