]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: disk usage on empty pool no longer returns an error message 19045/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 20 Nov 2017 16:03:17 +0000 (11:03 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 20 Nov 2017 16:03:17 +0000 (11:03 -0500)
Fixes: http://tracker.ceph.com/issues/22200
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd/action/DiskUsage.cc

index 9934e81dd21fe43e4ab053ab0d0c580814b53bde..5da9fec3f19073885551401b5f0da4b41375cff8 100644 (file)
@@ -208,7 +208,7 @@ static int do_disk_usage(librbd::RBD &rbd, librados::IoCtx &io_ctx,
       ++count;
     }
   }
-  if (!found) {
+  if (imgname != nullptr && !found) {
     std::cerr << "specified image " << imgname << " is not found." << std::endl;
     return -ENOENT;
   }