From 9fc84cc0dc2910678c97b178872fae27f82b2dc7 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Thu, 14 Jul 2022 14:42:45 +0200 Subject: [PATCH] rbd: drop unused default_empty_pool_name argument Signed-off-by: Ilya Dryomov (cherry picked from commit 365300f253fd8066ae6f8cbd36c94ff4b145ab8d) --- src/tools/rbd/Utils.cc | 3 +-- src/tools/rbd/Utils.h | 3 +-- src/tools/rbd/action/Group.cc | 2 +- src/tools/rbd/action/List.cc | 2 +- src/tools/rbd/action/MirrorPool.cc | 22 +++++++++++----------- src/tools/rbd/action/Namespace.cc | 6 +++--- src/tools/rbd/action/Perf.cc | 4 ++-- src/tools/rbd/action/Pool.cc | 4 ++-- src/tools/rbd/action/Trash.cc | 4 ++-- 9 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/tools/rbd/Utils.cc b/src/tools/rbd/Utils.cc index 161cb91de1701..a47b45a8be1be 100644 --- a/src/tools/rbd/Utils.cc +++ b/src/tools/rbd/Utils.cc @@ -197,8 +197,7 @@ std::string get_default_pool_name() { } int get_pool_and_namespace_names( - const boost::program_options::variables_map &vm, - bool default_empty_pool_name, bool validate_pool_name, + const boost::program_options::variables_map &vm, bool validate_pool_name, std::string* pool_name, std::string* namespace_name, size_t *arg_index) { if (namespace_name != nullptr && vm.count(at::NAMESPACE_NAME)) { *namespace_name = vm[at::NAMESPACE_NAME].as(); diff --git a/src/tools/rbd/Utils.h b/src/tools/rbd/Utils.h index 66f8e18881b2f..3ed5bfddbcb6a 100644 --- a/src/tools/rbd/Utils.h +++ b/src/tools/rbd/Utils.h @@ -105,8 +105,7 @@ void normalize_pool_name(std::string* pool_name); std::string get_default_pool_name(); int get_pool_and_namespace_names( - const boost::program_options::variables_map &vm, - bool default_empty_pool_name, bool validate_pool_name, + const boost::program_options::variables_map &vm, bool validate_pool_name, std::string* pool_name, std::string* namespace_name, size_t *arg_index); int get_pool_image_snapshot_names( diff --git a/src/tools/rbd/action/Group.cc b/src/tools/rbd/action/Group.cc index e4d49bdac73c7..5c2232a6fc68f 100644 --- a/src/tools/rbd/action/Group.cc +++ b/src/tools/rbd/action/Group.cc @@ -123,7 +123,7 @@ int execute_list(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/List.cc b/src/tools/rbd/action/List.cc index c8bc3eeb83a2d..8fdc3c1a778f5 100644 --- a/src/tools/rbd/action/List.cc +++ b/src/tools/rbd/action/List.cc @@ -314,7 +314,7 @@ int execute(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/MirrorPool.cc b/src/tools/rbd/action/MirrorPool.cc index 052df75f8d874..b714c3babadec 100644 --- a/src/tools/rbd/action/MirrorPool.cc +++ b/src/tools/rbd/action/MirrorPool.cc @@ -826,7 +826,7 @@ int execute_peer_bootstrap_create( const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -885,7 +885,7 @@ int execute_peer_bootstrap_import( const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -978,7 +978,7 @@ int execute_peer_add(const po::variables_map &vm, const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -1069,7 +1069,7 @@ int execute_peer_remove(const po::variables_map &vm, const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -1117,7 +1117,7 @@ int execute_peer_set(const po::variables_map &vm, const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -1288,7 +1288,7 @@ int execute_disable(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -1311,7 +1311,7 @@ int execute_enable(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -1367,7 +1367,7 @@ int execute_info(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -1463,7 +1463,7 @@ int execute_status(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -1653,7 +1653,7 @@ int execute_promote(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -1692,7 +1692,7 @@ int execute_demote(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/Namespace.cc b/src/tools/rbd/action/Namespace.cc index 746ab40c2b26c..12d92bff86e89 100644 --- a/src/tools/rbd/action/Namespace.cc +++ b/src/tools/rbd/action/Namespace.cc @@ -30,7 +30,7 @@ int execute_create(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -69,7 +69,7 @@ int execute_remove(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -115,7 +115,7 @@ int execute_list(const po::variables_map &vm, const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, true, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, true, &pool_name, nullptr, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/Perf.cc b/src/tools/rbd/action/Perf.cc index fdef1965f8aaa..b39beac9148e4 100644 --- a/src/tools/rbd/action/Perf.cc +++ b/src/tools/rbd/action/Perf.cc @@ -584,7 +584,7 @@ int execute_iostat(const po::variables_map &vm, std::string pool; std::string pool_namespace; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, false, false, &pool, + int r = utils::get_pool_and_namespace_names(vm, false, &pool, &pool_namespace, &arg_index); if (r < 0) { return r; @@ -671,7 +671,7 @@ int execute_iotop(const po::variables_map &vm, std::string pool; std::string pool_namespace; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, false, false, &pool, + int r = utils::get_pool_and_namespace_names(vm, false, &pool, &pool_namespace, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/Pool.cc b/src/tools/rbd/action/Pool.cc index f1718eb1e1325..2ad8e17ff8e24 100644 --- a/src/tools/rbd/action/Pool.cc +++ b/src/tools/rbd/action/Pool.cc @@ -29,7 +29,7 @@ int execute_init(const po::variables_map &vm, const std::vector &ceph_global_init_args) { std::string pool_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, nullptr, &arg_index); if (r < 0) { return r; @@ -68,7 +68,7 @@ int execute_stats(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index 538318508570c..f1fd4df3c364f 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -357,7 +357,7 @@ int execute_list(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; @@ -408,7 +408,7 @@ int execute_purge(const po::variables_map &vm, std::string pool_name; std::string namespace_name; size_t arg_index = 0; - int r = utils::get_pool_and_namespace_names(vm, true, false, &pool_name, + int r = utils::get_pool_and_namespace_names(vm, false, &pool_name, &namespace_name, &arg_index); if (r < 0) { return r; -- 2.39.5