]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | ||
4 | #include "include/types.h" | |
5 | #include "include/utime.h" | |
6 | ||
7 | #include "Dentry.h" | |
8 | #include "Dir.h" | |
9 | #include "Inode.h" | |
10 | ||
11 | #include "common/Formatter.h" | |
12 | ||
13 | void Dentry::dump(Formatter *f) const | |
14 | { | |
15 | f->dump_string("name", name); | |
16 | f->dump_stream("dir") << dir->parent_inode->ino; | |
17 | if (inode) | |
18 | f->dump_stream("ino") << inode->ino; | |
19 | f->dump_int("ref", ref); | |
31f18b77 | 20 | f->dump_int("offset", offset); |
7c673cae FG |
21 | if (lease_mds >= 0) { |
22 | f->dump_int("lease_mds", lease_mds); | |
23 | f->dump_stream("lease_ttl") << lease_ttl; | |
31f18b77 FG |
24 | f->dump_unsigned("lease_gen", lease_gen); |
25 | f->dump_unsigned("lease_seq", lease_seq); | |
7c673cae FG |
26 | } |
27 | f->dump_int("cap_shared_gen", cap_shared_gen); | |
28 | } | |
11fdf7f2 TL |
29 | |
30 | std::ostream &operator<<(std::ostream &oss, const Dentry &dn) | |
31 | { | |
32 | return oss << dn.dir->parent_inode->vino() << "[\"" << dn.name << "\"]"; | |
33 | } |