From: David Zafman Date: Thu, 7 Aug 2014 21:11:21 +0000 (-0700) Subject: ceph_objectstore_tool: Minor improvements X-Git-Tag: v0.80.10~69^2~67 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=63529079b97c99cbaa863e1be865e2693e90c556;p=ceph.git ceph_objectstore_tool: Minor improvements Make all non-error non-debug output to stdout Fix a message Signed-off-by: David Zafman (cherry picked from commit a2bd2aa7babb4ad45ba21c70f9d179fda27742aa) --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 616103c176d0..ad31be20c168 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -641,7 +641,7 @@ int export_file(ObjectStore *store, coll_t cid, ghobject_t &obj) if (ret < 0) return ret; - cerr << "read " << obj << std::endl; + cout << "Read " << obj << std::endl; total = st.st_size; if (debug) @@ -783,7 +783,7 @@ int do_export(ObjectStore *fs, coll_t coll, spg_t pgid, pg_info_t &info, PGLog::IndexedLog log; pg_missing_t missing; - cerr << "Exporting " << pgid << std::endl; + cout << "Exporting " << pgid << std::endl; int ret = get_log(fs, coll, pgid, info, log, missing); if (ret > 0) @@ -1834,11 +1834,11 @@ int main(int argc, char **argv) } } - cerr << colls_to_check.size() << " pgs to scan" << std::endl; + cout << colls_to_check.size() << " pgs to scan" << std::endl; for (vector::iterator i = colls_to_check.begin(); i != colls_to_check.end(); ++i, ++scanned) { - cerr << "Scanning " << *i << ", " << scanned << "/" + cout << "Scanning " << *i << ", " << scanned << "/" << colls_to_check.size() << " completed" << std::endl; ghobject_t next; while (!next.is_max()) { @@ -1881,7 +1881,7 @@ int main(int argc, char **argv) cout << *i << "/" << *obj << " is lost" << std::endl; } if (op == "fix-lost") { - cerr << *i << "/" << *obj << " is lost, fixing" << std::endl; + cout << *i << "/" << *obj << " is lost, fixing" << std::endl; oi.clear_flag(object_info_t::FLAG_LOST); bufferlist bl2; ::encode(oi, bl2); @@ -1899,7 +1899,7 @@ int main(int argc, char **argv) } } } - cerr << "Completed" << std::endl; + cout << "Completed" << std::endl; UMOUNT: fs->sync_and_flush(); @@ -1934,7 +1934,7 @@ int main(int argc, char **argv) continue; } if (snap != CEPH_NOSNAP && debug) { - cerr << "skipping snapped dir " << *it + cout << "skipping snapped dir " << *it << " (pg " << pgid << " snap " << snap << ")" << std::endl; continue; }