Fix op validation, fix journal sector usage tracking
Now it runs for a while with fio but then crashes with ENOSPC because of an apparent bug in the allocator
This commit is contained in:
@@ -122,6 +122,19 @@ void blockstore::handle_stable_event(ring_data_t *data, blockstore_operation *op
|
||||
op->pending_ops--;
|
||||
if (op->pending_ops == 0)
|
||||
{
|
||||
// Release used journal sectors
|
||||
if (op->min_used_journal_sector > 0)
|
||||
{
|
||||
uint64_t s = op->min_used_journal_sector;
|
||||
while (1)
|
||||
{
|
||||
journal.sector_info[s-1].usage_count--;
|
||||
if (s == op->max_used_journal_sector)
|
||||
break;
|
||||
s = (s + 1) % journal.sector_count;
|
||||
}
|
||||
op->min_used_journal_sector = op->max_used_journal_sector = 0;
|
||||
}
|
||||
// First step: mark dirty_db entries as stable, acknowledge op completion
|
||||
obj_ver_id* v;
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user