Skip to content

Commit a66e80a

Browse files
committed
mds: dump alternate_name to formatter
Signed-off-by: Patrick Donnelly <[email protected]>
1 parent d27b115 commit a66e80a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mds/CDentry.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,15 @@ void CDentry::dump(Formatter *f) const
600600
make_path(path);
601601

602602
f->dump_string("path", path.get_path());
603+
if (auto s = get_alternate_name(); !s.empty()) {
604+
bufferlist bl, b64;
605+
bl.append(s);
606+
bl.encode_base64(b64);
607+
auto encoded = std::string_view(b64.c_str(), b64.length());
608+
f->dump_string("alternate_name", encoded);
609+
} else {
610+
f->dump_string("alternate_name", "");
611+
}
603612
f->dump_unsigned("path_ino", path.get_ino().val);
604613
f->dump_unsigned("snap_first", first);
605614
f->dump_unsigned("snap_last", last);

0 commit comments

Comments
 (0)