Fix metadata area size calculation, print free space, wait for free space

FIXME: Now it crashes with -ENOSPC on linear overwrite
This commit is contained in:
Vitaliy Filippov
2019-11-28 20:23:27 +03:00
parent 9fa0d3325f
commit b6fff5a77e
8 changed files with 38 additions and 11 deletions
+8
View File
@@ -260,6 +260,14 @@ void blockstore::check_wait(blockstore_operation *op)
}
op->wait_for = 0;
}
else if (op->wait_for == WAIT_FREE)
{
if (!data_alloc->get_free_count() && !flusher->is_active())
{
return;
}
op->wait_for = 0;
}
else
{
throw std::runtime_error("BUG: op->wait_for value is unexpected");