diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index 58d3aff9d85..953dcd22d58 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -3690,7 +3690,8 @@ int NewStore::_zero(TransContext *txc, goto out; } f.length = (offset + length) - f.offset; - ::ftruncate(fd, f.length); + r = ::ftruncate(fd, f.length); + assert(r == 0); // this shouldn't fail dout(20) << __func__ << " tail " << f.fid << " truncating up to " << f.length << dendl; o->onode.size = offset + length;