#include "common/Formatter.h"
#include "common/TextTable.h"
#include <iostream>
+#include <boost/bind.hpp>
#include <boost/program_options.hpp>
#include "global/global_context.h"
std::vector<librbd::snap_info_t> snaplist;
if (w->img.snap_list(snaplist) >= 0 && !snaplist.empty()) {
+ snaplist.erase(remove_if(snaplist.begin(),
+ snaplist.end(),
+ boost::bind(utils::is_not_user_snap_namespace, &w->img, _1)),
+ snaplist.end());
for (std::vector<librbd::snap_info_t>::iterator s = snaplist.begin();
s != snaplist.end(); ++s) {
bool is_protected;
}
r = list_process_image(&rados, comp, lflag, f, tbl);
if (r < 0) {
- std::cerr << "rbd: error processing image " << comp->name << ": " << cpp_strerror(r)
+ std::cerr << "rbd: error processing image " << comp->name << ": " << cpp_strerror(r)
<< std::endl;
}
comp->completion = new librbd::RBD::AioCompletion(nullptr, nullptr);
g_conf().get_val<int64_t>("rbd_concurrent_management_ops"),
formatter.get());
if (r < 0) {
- std::cerr << "rbd: list: " << cpp_strerror(r) << std::endl;
+ std::cerr << "rbd: listing images failed : " << cpp_strerror(r) << std::endl;
return r;
}