Rewrite journal_init to the "goto-coroutine" style

This commit is contained in:
Vitaliy Filippov
2019-11-19 19:50:58 +03:00
parent 3bfa2f5f39
commit b5f04c58ff
2 changed files with 111 additions and 121 deletions
+4 -1
View File
@@ -16,14 +16,17 @@ public:
class blockstore_init_journal
{
blockstore *bs;
int wait_state = 0;
uint8_t *journal_buffer = NULL;
int step = 0;
uint32_t crc32_last = 0;
bool started = false;
uint64_t done_pos = 0, journal_pos = 0;
uint64_t cur_skip = 0;
bool wrapped = false;
int submitted = 0, done_buf = 0, done_len = 0;
struct io_uring_sqe *sqe;
struct ring_data_t *data;
journal_entry_start *je_start;
int handle_journal_part(void *buf, uint64_t len);
void handle_event(ring_data_t *data);
public: