From: Sage Weil Date: Mon, 23 Jan 2017 15:24:40 +0000 (-0500) Subject: os/bluestore/BlueFS: tolerate longer tail X-Git-Tag: v12.0.0~99^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8f5fcfd857bef21eb962720e21b6a9374dd07df8;p=ceph-ci.git os/bluestore/BlueFS: tolerate longer tail The important requirement here is that we have enough buffer to write the whole page. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 216f5ce1f54..77b8555c6ee 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1572,10 +1572,10 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length) // we are using the page_aligned_appender, and can safely use // the tail of the raw buffer. const bufferptr &last = t.back(); - if (last.unused_tail_length() != zlen) { + if (last.unused_tail_length() < zlen) { derr << " wtf, last is " << last << " from " << t << dendl; + assert(last.unused_tail_length() >= zlen); } - assert(last.unused_tail_length() == zlen); bufferptr z = last; z.set_offset(last.offset() + last.length()); z.set_length(zlen);