]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: Fix pgid scan to skip snapdirs
authorDavid Zafman <dzafman@redhat.com>
Fri, 13 Mar 2015 07:41:39 +0000 (00:41 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 25 Feb 2016 20:50:20 +0000 (12:50 -0800)
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 <dzafman@redhat.com>
(cherry picked from commit 24f06598966319a62fa58a5831d9741fac1d471b)

src/tools/ceph_objectstore_tool.cc

index 7c64875684c80d17a10b6bde822f79e9dc30ea12..c4e3b27e67e6d3ae0faac2628be74d0e38b2ab98 100644 (file)
@@ -2902,8 +2902,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;
     }