MCPcopy Create free account
hub / github.com/ceph/ceph / dump_inode

Method dump_inode

src/client/Client.cc:550–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548// debug crapola
549
550void Client::dump_inode(Formatter *f, Inode *in, set<Inode*>& did, bool disconnected)
551{
552 filepath path;
553 in->make_long_path(path);
554 ldout(cct, 1) << "dump_inode: "
555 << (disconnected ? "DISCONNECTED ":"")
556 << "inode " << in->ino
557 << " " << path
558 << " ref " << in->get_nref()
559 << " " << *in << dendl;
560
561 if (f) {
562 f->open_object_section("inode");
563 f->dump_stream("path") << path;
564 if (disconnected)
565 f->dump_int("disconnected", 1);
566 in->dump(f);
567 f->close_section();
568 }
569
570 did.insert(in);
571 if (in->dir) {
572 ldout(cct, 1) << " dir " << in->dir << " size " << in->dir->dentries.size() << dendl;
573 for (auto it = in->dir->dentries.begin();
574 it != in->dir->dentries.end();
575 ++it) {
576 ldout(cct, 1) << " " << in->ino << " dn " << it->first << " " << it->second << " ref " << it->second->ref << dendl;
577 if (f) {
578 f->open_object_section("dentry");
579 it->second->dump(f);
580 f->close_section();
581 }
582 if (it->second->inode)
583 dump_inode(f, it->second->inode.get(), did, false);
584 }
585 }
586}
587
588void Client::dump_cache(Formatter *f)
589{

Callers

nothing calls this directly

Calls 12

make_long_pathMethod · 0.80
get_nrefMethod · 0.80
open_object_sectionMethod · 0.45
dump_streamMethod · 0.45
dump_intMethod · 0.45
dumpMethod · 0.45
close_sectionMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected