]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore/BlueFS: assert we never extend log at flush
authorSage Weil <sage@redhat.com>
Fri, 12 Aug 2016 19:32:34 +0000 (15:32 -0400)
committerSage Weil <sage@redhat.com>
Sat, 13 Aug 2016 15:49:12 +0000 (11:49 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueFS.cc

index 394a31d64d828117b99a9785afadbaa62438c97d..835b76063fd7f122ed638df5410f261adf2e5135 100644 (file)
@@ -1210,6 +1210,9 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
   // previously allocated extents.
   bool must_dirty = false;
   if (allocated < offset + length) {
+    // we should never run out of log space here; see the min runway check
+    // in _flush_and_sync_log.
+    assert(h->file->fnode.ino != 1);
     int r = _allocate(h->file->fnode.prefer_bdev,
                      offset + length - allocated,
                      &h->file->fnode.extents);