Fix possible write stall

The stall occurred during fio Q=128 random write tests with low flusher_count (4).
It was caused by flushers being unable to flush the beginning of the journal
because it contained older writes to an object that also had writes in the very end
of the journal, after dirty_start.
This commit is contained in:
Vitaliy Filippov
2020-06-01 16:18:23 +03:00
parent c22e096943
commit e6a4b634f8
5 changed files with 86 additions and 16 deletions
+4 -2
View File
@@ -73,9 +73,10 @@ public:
// Journal flusher itself
class journal_flusher_t
{
int trim_wanted = 0;
bool dequeuing;
int flusher_count;
int sync_threshold;
int flusher_start_threshold;
journal_flusher_co *co;
blockstore_impl_t *bs;
friend class journal_flusher_co;
@@ -96,7 +97,8 @@ public:
~journal_flusher_t();
void loop();
bool is_active();
void force_start();
void request_trim();
void release_trim();
void enqueue_flush(obj_ver_id oid);
void unshift_flush(obj_ver_id oid);
};