Merge pull request #16992 from liewegas/wip-20977

os/bluestore: do not segv on kraken upgrade debug print

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
Sage Weil 2017-08-11 21:36:53 -05:00 committed by GitHub
commit 8619fb6a2a

View File

@ -1703,9 +1703,13 @@ ostream& operator<<(ostream& out, const BlueStore::Blob& b)
if (b.is_spanning()) {
out << " spanning " << b.id;
}
out << " " << b.get_blob() << " " << b.get_blob_use_tracker()
<< " " << *b.shared_blob
<< ")";
out << " " << b.get_blob() << " " << b.get_blob_use_tracker();
if (b.shared_blob) {
out << " " << *b.shared_blob;
} else {
out << " (shared_blob=NULL)";
}
out << ")";
return out;
}