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;
return r;
}
- utils::normalize_pool_name(&pool);
+ if (!pool_namespace.empty()) {
+ // default empty pool name only if namespace is specified to allow
+ // for an empty pool_spec (-> GLOBAL_POOL_KEY)
+ utils::normalize_pool_name(&pool);
+ }
std::string pool_spec = format_pool_spec(pool, pool_namespace);
// no point to refreshing faster than the stats period
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;
return r;
}
- utils::normalize_pool_name(&pool);
+ if (!pool_namespace.empty()) {
+ // default empty pool name only if namespace is specified to allow
+ // for an empty pool_spec (-> GLOBAL_POOL_KEY)
+ utils::normalize_pool_name(&pool);
+ }
iotop::MainWindow mainWindow(rados, format_pool_spec(pool, pool_namespace));
r = mainWindow.run();
if (r < 0) {