]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix ZERO fallback write
authorSage Weil <sage@newdream.net>
Mon, 2 Apr 2012 00:04:58 +0000 (17:04 -0700)
committerSage Weil <sage@newdream.net>
Mon, 2 Apr 2012 00:04:58 +0000 (17:04 -0700)
It helps if we write zeros!

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/FileStore.cc

index 6a93107efccdf5687a242a7d885e0b67427dea09..7b876dda56c4b5fd6b67a93bccc65a94c98e4dcd 100644 (file)
@@ -3057,6 +3057,7 @@ int FileStore::_zero(coll_t cid, const hobject_t& oid, uint64_t offset, size_t l
   dout(20) << "zero FALLOC_FL_PUNCH_HOLE not supported, falling back to writing zeros" << dendl;
   {
     bufferptr bp(len);
+    bp.zero();
     bufferlist bl;
     bl.push_back(bp);
     ret = _write(cid, oid, offset, len, bl);