From: Sage Weil Date: Fri, 2 Dec 2016 16:52:02 +0000 (-0500) Subject: os/bluestore: dump allocator state on allocation failure X-Git-Tag: v11.1.0~74^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=462110a05885de62c42ca8bf0c39fcda46eac84f;p=ceph-ci.git os/bluestore: dump allocator state on allocation failure 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 --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 8df7e712903..130fb16bfe6 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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; } diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index d80ca2ca201..8804ac74318 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3573,6 +3573,9 @@ int BlueStore::_balance_bluefs_freespace(vector *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; }