| 548 | // debug crapola |
| 549 | |
| 550 | void 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 | |
| 588 | void Client::dump_cache(Formatter *f) |
| 589 | { |
nothing calls this directly
no test coverage detected