This prevents partial results from concatenating with the error message.
Fixes: http://tracker.ceph.com/issues/21252
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
2b2b3d2035a700a65c3c469eedae69ad31023cf6)
if (r != 0) {
ss << "Failed to dump cache: " << cpp_strerror(r);
+ f->reset();
}
} else if (command == "cache status") {
Mutex::Locker l(mds_lock);
int r = mdcache->dump_cache(root, depth, f);
if (r != 0) {
ss << "Failed to dump tree: " << cpp_strerror(r);
+ f->reset();
}
}
} else if (command == "force_readonly") {