From: Ilya Dryomov Date: Thu, 14 Jul 2022 12:42:45 +0000 (+0200) Subject: rbd: drop unused default_empty_pool_name argument X-Git-Tag: v15.2.17~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff8914722a4ab385ace40abc3484a2c23552b4b9;p=ceph.git rbd: drop unused default_empty_pool_name argument Signed-off-by: Ilya Dryomov (cherry picked from commit 365300f253fd8066ae6f8cbd36c94ff4b145ab8d) --- diff --git a/src/tools/rbd/Utils.cc b/src/tools/rbd/Utils.cc index 30eaccefc4a..e86b406eee5 100644 --- a/src/tools/rbd/Utils.cc +++ b/src/tools/rbd/Utils.cc @@ -194,8 +194,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 476c229bec0..d92de0d838b 100644 --- a/src/tools/rbd/Utils.h +++ b/src/tools/rbd/Utils.h @@ -103,8 +103,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 8554ae3b4ef..4e8217e4e10 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 65ab03752ad..8148ef9b456 100644 --- a/src/tools/rbd/action/List.cc +++ b/src/tools/rbd/action/List.cc @@ -313,7 +313,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 99902c72be8..212cac7cb2f 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 746ab40c2b2..12d92bff86e 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 61a200b4b22..4616f604038 100644 --- a/src/tools/rbd/action/Perf.cc +++ b/src/tools/rbd/action/Perf.cc @@ -580,7 +580,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; @@ -666,7 +666,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 f1718eb1e13..2ad8e17ff8e 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 a887f0d31da..2b9e6292b3d 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -353,7 +353,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; @@ -404,7 +404,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;