Fix another stall due to bad unstable_writes tracking, do not try to write beyond the end of the journal

This commit is contained in:
Vitaliy Filippov
2019-11-28 00:28:08 +03:00
parent 2630e2e3b9
commit 35a6ed728d
6 changed files with 13 additions and 8 deletions
+2
View File
@@ -146,6 +146,8 @@ int blockstore::dequeue_write(blockstore_operation *op)
dirty_it->second.location = journal.next_free;
dirty_it->second.state = ST_J_SUBMITTED;
journal.next_free += op->len;
if (journal.next_free >= journal.len)
journal.next_free = 512;
op->pending_ops = 2;
// Remember small write as unsynced
unsynced_small_writes.push_back((obj_ver_id){