From: Ilya Dryomov Date: Wed, 26 May 2021 12:21:22 +0000 (+0200) Subject: rbd: propagate Trash::purge() result X-Git-Tag: v14.2.22~17^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00244a19be82bc05d56b4e92911bf4a0676d4ef2;p=ceph.git rbd: propagate Trash::purge() result Exit with respective status like other commands do. Signed-off-by: Ilya Dryomov (cherry picked from commit d0dd4b75d3efdb7de1e865f09434e8d7392ef158) --- diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index 3362ac30b5f7..f26dc79a07f0 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -395,8 +395,8 @@ void get_purge_arguments(po::options_description *positional, "value range: 0.0-1.0"); } -int execute_purge (const po::variables_map &vm, - const std::vector &ceph_global_init_args) { +int execute_purge(const po::variables_map &vm, + const std::vector &ceph_global_init_args) { std::string pool_name; std::string namespace_name; size_t arg_index = 0; @@ -441,10 +441,10 @@ int execute_purge (const po::variables_map &vm, r = rbd.trash_purge_with_progress(io_ctx, expire_ts, threshold, pc); if (r < 0) { pc.fail(); - } else { - pc.finish(); + return r; } + pc.finish(); return 0; }