From 8f5fcfd857bef21eb962720e21b6a9374dd07df8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 23 Jan 2017 10:24:40 -0500 Subject: [PATCH] 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 --- src/os/bluestore/BlueFS.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 216f5ce1f54ea..77b8555c6eef5 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); -- 2.39.5