Remember writes as "unsynced" only after completing them

Previously BS_OP_SYNC could take unfinished writes and add them into the journal before
they were actually completed. This was leading to crashes with the message
"BUG: Unexpected dirty_entry 2000000000001:9f2a0000 v3 unstable state during flush: 338"
This commit is contained in:
Vitaliy Filippov
2021-03-25 02:41:58 +03:00
parent 0949f08407
commit b0ad1e1e6d
4 changed files with 30 additions and 27 deletions
+1
View File
@@ -210,6 +210,7 @@ class blockstore_impl_t
blockstore_dirty_db_t dirty_db;
std::vector<blockstore_op_t*> submit_queue;
std::vector<obj_ver_id> unsynced_big_writes, unsynced_small_writes;
int unsynced_big_write_count = 0;
allocator *data_alloc = NULL;
uint8_t *zero_object;