Allow to start the OSD just to flush the journal completely

This commit is contained in:
Vitaliy Filippov
2021-04-10 17:44:12 +03:00
parent ec90fe6ec1
commit 6909807068
4 changed files with 29 additions and 4 deletions
+14 -1
View File
@@ -92,10 +92,23 @@ void blockstore_impl_t::loop()
{
delete journal_init_reader;
journal_init_reader = NULL;
initialized = 10;
if (journal.flush_journal)
initialized = 3;
else
initialized = 10;
ringloop->wakeup();
}
}
if (initialized == 3)
{
if (readonly)
{
printf("Can't flush the journal in readonly mode\n");
exit(1);
}
flusher->loop();
ringloop->submit();
}
}
else
{