]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: do not segv on kraken upgrade debug print 16992/head
authorSage Weil <sage@redhat.com>
Fri, 11 Aug 2017 15:58:42 +0000 (11:58 -0400)
committerSage Weil <sage@redhat.com>
Fri, 11 Aug 2017 20:44:48 +0000 (16:44 -0400)
commit50523a225b2f415b8c3d82faeae59c0eede54663
treeaf9e54f85fc5d780f62e5c389ddd0bdc34804559
parent50724db8e57068a374f559873340ec8d124afe43
os/bluestore: do not segv on kraken upgrade debug print

When loading an onode from kraken we have a compat path that calls
get_ref before the SharedBlob pointer is initialized.  This is fine except
that if debugging is enabled the operator<< on the Blob will segv on
printing *b.shared_blob (which is NULL).

Fix operator<< to print something else if it is NULL.  shared_blob does
get set up right after the call to decode() so having it be NULL at this
point is otherwise harmless.

Fixes: http://tracker.ceph.com/issues/20977
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc