From: David Zafman Date: Fri, 13 Mar 2015 07:41:39 +0000 (-0700) Subject: ceph-objectstore-tool: Fix pgid scan to skip snapdirs X-Git-Tag: v9.0.2~168^2~25 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=24f06598966319a62fa58a5831d9741fac1d471b;p=ceph.git ceph-objectstore-tool: Fix pgid scan to skip snapdirs Long standing bug where it wasn't skipping snapdirs if !debug For debug output use stderr like all other cases Signed-off-by: David Zafman --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 7d66c6d46e75b..9e43a1540ae15 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -2903,8 +2903,9 @@ int main(int argc, char **argv) if (op != "list-pgs" && tmppgid != pgid) { continue; } - if (snap != CEPH_NOSNAP && debug) { - cout << "skipping snapped dir " << *it + if (snap != CEPH_NOSNAP) { + if (debug) + cerr << "skipping snapped dir " << *it << " (pg " << pgid << " snap " << snap << ")" << std::endl; continue; }