Because inodes from other pools now store their backtrace
on the first/default data pool, it is special and may not
be removed.
Fixes: 7109
Signed-off-by: John Spray <john.spray@inktank.com>
ss << "pool '" << poolname << "' does not exist";
}
}
+
+ if (pending_mdsmap.get_first_data_pool() == poolid) {
+ r = -EINVAL;
+ poolid = -1;
+ ss << "cannot remove default data pool";
+ }
+
if (poolid >= 0) {
cmd_getval(g_ceph_context, cmdmap, "poolid", poolid);
r = pending_mdsmap.remove_data_pool(poolid);