]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: tolerate longer tail 13032/head
authorSage Weil <sage@redhat.com>
Mon, 23 Jan 2017 15:24:40 +0000 (10:24 -0500)
committerSage Weil <sage@redhat.com>
Mon, 23 Jan 2017 15:24:40 +0000 (10:24 -0500)
The important requirement here is that we have enough buffer to write the
whole page.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueFS.cc

index 216f5ce1f54eacdca404874d94faaae222a8ebc8..77b8555c6eef50d0716ae8c78508af9dc4eb9e3e 100644 (file)
@@ -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);