]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix EMetaBlob::fullbit xattr dump 11536/head
authorSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 18:02:47 +0000 (14:02 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 18:03:17 +0000 (14:03 -0400)
- show xattr names!
- bound the values

Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/journal.cc

index 70a843be1df2e447612b6b86a75dc64c74758017..1105cb1c744e46aff9a688b750fd816133a8e57f 100644 (file)
@@ -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);
   }
   f->close_section(); // xattrs
   if (inode.is_symlink()) {