From: Sage Weil Date: Thu, 14 Jun 2018 19:15:20 +0000 (-0500) Subject: os/bluestore: print cnode from _open_collections X-Git-Tag: v14.0.1~1076^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b308b6b1554b3203e02e64e3963ef4901274f23f;p=ceph.git os/bluestore: print cnode from _open_collections Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 4a334b9194846..a22360f25b555 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5212,7 +5212,8 @@ int BlueStore::_open_collections(int *errors) << pretty_binary_string(it->key()) << dendl; return -EIO; } - dout(20) << __func__ << " opened " << cid << " " << c << dendl; + dout(20) << __func__ << " opened " << cid << " " << c + << " " << c->cnode << dendl; coll_map[cid] = c; } else { derr << __func__ << " unrecognized collection " << it->key() << dendl; diff --git a/src/os/bluestore/bluestore_types.cc b/src/os/bluestore/bluestore_types.cc index a58f6cb8157cd..df24a06442c3f 100644 --- a/src/os/bluestore/bluestore_types.cc +++ b/src/os/bluestore/bluestore_types.cc @@ -94,6 +94,11 @@ void bluestore_cnode_t::generate_test_instances(list& o) o.push_back(new bluestore_cnode_t(123)); } +ostream& operator<<(ostream& out, const bluestore_cnode_t& l) +{ + return out << "cnode(bits " << l.bits << ")"; +} + // bluestore_extent_ref_map_t void bluestore_extent_ref_map_t::_check() const diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index ce7d6e38ab227..f1a938c7acb7e 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -64,6 +64,8 @@ struct bluestore_cnode_t { }; WRITE_CLASS_DENC(bluestore_cnode_t) +ostream& operator<<(ostream& out, const bluestore_cnode_t& l); + /// pextent: physical extent struct bluestore_pextent_t { static const uint64_t INVALID_OFFSET = ~0ull;