]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: allocate shouldn't fail if reserve succeeded
authorSage Weil <sage@redhat.com>
Wed, 23 Dec 2015 15:21:25 +0000 (10:21 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:29 +0000 (13:07 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueStore.cc

index 060d8e3672d073c710ecd452972f02c46c8b2ab8..600784df47e6497a404ce0b934ceb2c26d479c4c 100644 (file)
@@ -1077,8 +1077,10 @@ int BlueFS::_allocate(unsigned id, uint64_t len, vector<bluefs_extent_t> *ev)
     e.bdev = id;
     int r = alloc[id]->allocate(left, g_conf->bluefs_alloc_size, hint,
                                &e.offset, &e.length);
-    if (r < 0)
+    if (r < 0) {
+      assert(0 == "allocate failed... wtf");
       return r;
+    }
     if (!ev->empty() && ev->back().end() == e.offset)
       ev->back().length += e.length;
     else
index 9a32fd5cbd3127260781222fc83c3e3d405bed40..7cf2ef9d2184ad4eb107e9daf276bc66946d80dc 100644 (file)
@@ -1430,8 +1430,10 @@ int BlueStore::_balance_bluefs_freespace(vector<bluestore_extent_t> *extents)
       bluestore_extent_t e;
       r =  alloc->allocate(MIN(gift, 1ull<<31), min_alloc_size, 0,
                           &e.offset, &e.length);
-      if (r < 0)
+      if (r < 0) {
+       assert(0 == "allocate failed, wtf");
        return r;
+      }
 
       dout(1) << __func__ << " gifting " << e << " to bluefs" << dendl;
       extents->push_back(e);