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

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Oct 18, 2016

  • show xattr names!
  • bound the values

This is breaking readable.sh tests due to wip-denc, which arranges buffers in memory a bit differently and thus prints different trailing garbage after the xattr values. Yeesh.

- show xattr names!
- bound the values

Signed-off-by: Sage Weil <sage@redhat.com>
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

@liewegas liewegas merged commit d9baaa1 into ceph:master Oct 18, 2016
@liewegas liewegas deleted the wip-fullbit-dump branch October 18, 2016 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants