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

Method dump

src/client/Inode.cc:450–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450void Inode::dump(Formatter *f) const
451{
452 f->dump_stream("ino") << ino;
453 f->dump_stream("snapid") << snapid;
454 if (rdev)
455 f->dump_unsigned("rdev", rdev);
456 f->dump_stream("ctime") << ctime;
457 f->dump_stream("btime") << btime;
458 f->dump_stream("mode") << '0' << std::oct << mode << std::dec;
459 f->dump_unsigned("uid", uid);
460 f->dump_unsigned("gid", gid);
461 f->dump_int("nlink", nlink);
462
463 f->dump_unsigned("size", size);
464 f->dump_unsigned("max_size", max_size);
465 f->dump_unsigned("truncate_seq", truncate_seq);
466 f->dump_unsigned("truncate_size", truncate_size);
467 f->dump_stream("mtime") << mtime;
468 f->dump_stream("atime") << atime;
469 f->dump_unsigned("time_warp_seq", time_warp_seq);
470 f->dump_unsigned("change_attr", change_attr);
471
472 f->dump_object("layout", layout);
473 if (is_dir()) {
474 f->open_object_section("dir_layout");
475 ::dump(dir_layout, f);
476 f->close_section();
477
478 f->dump_bool("complete", flags & I_COMPLETE);
479 f->dump_bool("ordered", flags & I_DIR_ORDERED);
480
481 /* FIXME when wip-mds-encoding is merged ***
482 f->open_object_section("dir_stat");
483 dirstat.dump(f);
484 f->close_section();
485
486 f->open_object_section("rstat");
487 rstat.dump(f);
488 f->close_section();
489 */
490 }
491
492 f->dump_unsigned("version", version);
493 f->dump_unsigned("xattr_version", xattr_version);
494 f->dump_unsigned("flags", flags);
495
496 if (is_dir()) {
497 f->dump_int("dir_hashed", (int)dir_hashed);
498 f->dump_int("dir_replicated", (int)dir_replicated);
499 if (dir_replicated) {
500 f->open_array_section("dirfrags");
501 for (const auto &frag : frag_repmap) {
502 f->open_object_section("frags");
503 CachedStackStringStream css;
504 *css << std::hex << frag.first.value() << "/" << std::dec << frag.first.bits();
505 f->dump_string("frag", css->strv());
506
507 f->open_array_section("repmap");

Callers

nothing calls this directly

Calls 15

ccap_stringFunction · 0.85
dumpFunction · 0.50
dump_streamMethod · 0.45
dump_unsignedMethod · 0.45
dump_intMethod · 0.45
dump_objectMethod · 0.45
open_object_sectionMethod · 0.45
close_sectionMethod · 0.45
dump_boolMethod · 0.45
open_array_sectionMethod · 0.45
valueMethod · 0.45
bitsMethod · 0.45

Tested by

no test coverage detected