The important requirement here is that we have enough buffer to write the
whole page.
Signed-off-by: Sage Weil <sage@redhat.com>
// 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);