Do not flush or recover in readonly mode

This commit is contained in:
Vitaliy Filippov
2020-04-11 12:06:18 +03:00
parent dd02bc1c44
commit d11e8dcb5e
3 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -204,7 +204,7 @@ void osd_t::handle_peers()
peering_state = peering_state & ~OSD_PEERING_PGS;
}
}
if (peering_state & OSD_FLUSHING_PGS)
if ((peering_state & OSD_FLUSHING_PGS) && !readonly)
{
bool still = false;
for (auto & p: pgs)
@@ -223,7 +223,7 @@ void osd_t::handle_peers()
peering_state = peering_state & ~OSD_FLUSHING_PGS | OSD_RECOVERING;
}
}
if (peering_state & OSD_RECOVERING)
if ((peering_state & OSD_RECOVERING) && !readonly)
{
if (!continue_recovery())
{