mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
ObjectCacher: more debugging for BufferHeads
This is useful for checking for lost waiters. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
efdb209b0b
commit
fd928b9b71
@ -598,7 +598,7 @@ public:
|
||||
|
||||
inline ostream& operator<<(ostream& out, ObjectCacher::BufferHead &bh)
|
||||
{
|
||||
out << "bh["
|
||||
out << "bh[ " << &bh << " "
|
||||
<< bh.start() << "~" << bh.length()
|
||||
<< " " << bh.ob
|
||||
<< " (" << bh.bl.length() << ")"
|
||||
@ -612,6 +612,17 @@ inline ostream& operator<<(ostream& out, ObjectCacher::BufferHead &bh)
|
||||
if (bh.bl.length() > 0) out << " firstbyte=" << (int)bh.bl[0];
|
||||
if (bh.error) out << " error=" << bh.error;
|
||||
out << "]";
|
||||
out << " waiters = {";
|
||||
for (map<loff_t, list<Context*> >::const_iterator it = bh.waitfor_read.begin();
|
||||
it != bh.waitfor_read.end(); ++it) {
|
||||
out << " " << it->first << "->[";
|
||||
for (list<Context*>::const_iterator lit = it->second.begin();
|
||||
lit != it->second.end(); ++lit) {
|
||||
out << *lit << ", ";
|
||||
}
|
||||
out << "]";
|
||||
}
|
||||
out << "}";
|
||||
return out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user