]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: dump allocator state on allocation failure
authorSage Weil <sage@redhat.com>
Fri, 2 Dec 2016 16:52:02 +0000 (11:52 -0500)
committerSage Weil <sage@redhat.com>
Fri, 2 Dec 2016 16:52:02 +0000 (11:52 -0500)
This is probably noisy for an *actual* ENOSPC, but the OSD should
actually prevent those from happening in general, and we are
very interested in fixing spurious allocation failures due to
allocator problems.  See http://tracker.ceph.com/issues/18054

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

index 8df7e712903c7ff858d484c817346f7ee5a8de89..130fb16bfe6f72120bdf3e01aaefb03979708f44 100644 (file)
@@ -1754,6 +1754,9 @@ int BlueFS::_allocate(uint8_t id, uint64_t len,
   r = alloc[id]->alloc_extents(left, min_alloc_size,
                                hint, &extents, &count);
   if (r < 0) {
+    derr << __func__ << " allocate failed on 0x" << std::hex << left
+        << " min_alloc_size 0x" << min_alloc_size << std::dec << dendl;
+    alloc[id]->dump();
     assert(0 == "allocate failed... wtf");
     return r;
   }
index d80ca2ca201fb95c60b4c12e0f41910a8fa43e54..8804ac74318c10cf0e462a33408188ad5ab6277e 100644 (file)
@@ -3573,6 +3573,9 @@ int BlueStore::_balance_bluefs_freespace(vector<bluestore_pextent_t> *extents)
       uint32_t elength;
       r = alloc->allocate(gift, min_alloc_size, hint, &eoffset, &elength);
       if (r < 0) {
+       derr << __func__ << " allocate failed on 0x" << std::hex << gift
+            << " min_alloc_size 0x" << min_alloc_size << std::dec << dendl;
+       alloc->dump();
         assert(0 == "allocate failed, wtf");
         return r;
       }