mirror of
https://github.com/ceph/ceph
synced 2025-01-15 23:43:06 +00:00
mon/OSDMonitor: reject force-create-pg on pgids that shouldn't exist
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
dcdb7aba28
commit
5aadca16f0
@ -10927,6 +10927,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
|
||||
err = -EINVAL;
|
||||
goto reply;
|
||||
}
|
||||
if (!osdmap.pg_exists(pgid)) {
|
||||
ss << "pg " << pgid << " should not exist";
|
||||
err = -ENOENT;
|
||||
goto reply;
|
||||
}
|
||||
bool creating_now;
|
||||
{
|
||||
std::lock_guard<std::mutex> l(creating_pgs_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user