Rewrite metadata_init to the same "goto-coroutine" style

This commit is contained in:
Vitaliy Filippov
2019-11-21 21:51:52 +03:00
parent 2b12428cb1
commit 201eeb8516
3 changed files with 57 additions and 47 deletions
+4
View File
@@ -3,9 +3,13 @@
class blockstore_init_meta
{
blockstore *bs;
int wait_state = 0, wait_count = 0;
uint8_t *metadata_buffer = NULL;
uint64_t metadata_read = 0;
int prev = 0, prev_done = 0, done_len = 0, submitted = 0, done_cnt = 0;
int entries_loaded = 0;
struct io_uring_sqe *sqe;
struct ring_data_t *data;
void handle_entries(struct clean_disk_entry* entries, int count, int block_order);
void handle_event(ring_data_t *data);
public: