]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #7460 from xiexingguo/xxg-wip-block
authorSage Weil <sage@redhat.com>
Sat, 6 Feb 2016 01:02:34 +0000 (20:02 -0500)
committerSage Weil <sage@redhat.com>
Sat, 6 Feb 2016 01:02:34 +0000 (20:02 -0500)
osd: blockdevice: avoid implicit cast and add guard

Reviewed-by: Sage Weil <sage@redhat.com>
1  2 
src/os/bluestore/KernelDevice.cc

index 984be4c5ed740630f1b0247384f0cc5f1513d83b,9991ade9e4a3dd4efe3fe0f28cdecb763264cd6e..b85b47393762cd86063375360f915b4190293879
@@@ -476,8 -466,9 +482,9 @@@ int KernelDevice::read(uint64_t off, ui
      r = -errno;
      goto out;
    }
+   assert((uint64_t)r == len);
    pbl->clear();
 -  pbl->push_back(p);
 +  pbl->push_back(std::move(p));
  
    dout(40) << "data: ";
    pbl->hexdump(*_dout);