]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rados: fix error message for cache(-try)-flush-evict-all commands 21009/head
authorMykola Golub <mgolub@suse.com>
Tue, 20 Mar 2018 11:39:10 +0000 (13:39 +0200)
committerMykola Golub <mgolub@suse.com>
Thu, 22 Mar 2018 18:18:18 +0000 (20:18 +0200)
do_cache_flush_evict_all returns -1 on an error, not an error code.
The actual error is printed by do_cache_flush_evict_all for every
failed object.

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/tools/rados/rados.cc

index c1fe40cc98c6be7f9cfcd7ae56809c309c789ccf..8c52275ce2de791cecfb1b4e4c48cd9d889e20c8 100644 (file)
@@ -3499,8 +3499,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
       usage_exit();
     ret = do_cache_flush_evict_all(io_ctx, true);
     if (ret < 0) {
-      cerr << "error from cache-flush-evict-all: "
-          << cpp_strerror(ret) << std::endl;
+      cerr << "cache-flush-evict-all finished with errors" << std::endl;
       goto out;
     }
   } else if (strcmp(nargs[0], "cache-try-flush-evict-all") == 0) {
@@ -3508,8 +3507,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
       usage_exit();
     ret = do_cache_flush_evict_all(io_ctx, false);
     if (ret < 0) {
-      cerr << "error from cache-try-flush-evict-all: "
-          << cpp_strerror(ret) << std::endl;
+      cerr << "cache-try-flush-evict-all finished with errors" << std::endl;
       goto out;
     }
   } else if (strcmp(nargs[0], "set-redirect") == 0) {