Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: fix EMetaBlob::fullbit xattr dump #11536

Merged
merged 1 commit into from Oct 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/mds/journal.cc
Expand Up @@ -495,10 +495,11 @@ void EMetaBlob::fullbit::dump(Formatter *f) const
f->open_object_section("inode");
inode.dump(f);
f->close_section(); // inode
f->open_array_section("xattrs");
f->open_object_section("xattrs");
for (map<string, bufferptr>::const_iterator iter = xattrs.begin();
iter != xattrs.end(); ++iter) {
f->dump_string(iter->first.c_str(), iter->second.c_str());
string s(iter->second.c_str(), iter->second.length());
f->dump_string(iter->first.c_str(), s);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas can do encode_json(iter->first.c_str(), s, f); instead which I think is cleaner, but other than that lgtm

}
f->close_section(); // xattrs
if (inode.is_symlink()) {
Expand Down