Copy io_uring_prep_* to my_uring_prep_* so they do not clear user_data

This commit is contained in:
Vitaliy Filippov
2019-11-17 21:39:30 +03:00
parent 2f429b17dd
commit c2de733e35
9 changed files with 128 additions and 31 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ int blockstore::continue_sync(blockstore_operation *op)
{
// No big writes, just fsync the journal
BS_SUBMIT_GET_SQE(sqe, data);
io_uring_prep_fsync(sqe, journal.fd, 0);
my_uring_prep_fsync(sqe, journal.fd, 0);
data->callback = cb;
op->pending_ops = 1;
op->sync_state = SYNC_JOURNAL_SYNC_SENT;
@@ -51,7 +51,7 @@ int blockstore::continue_sync(blockstore_operation *op)
{
// 1st step: fsync data
BS_SUBMIT_GET_SQE(sqe, data);
io_uring_prep_fsync(sqe, data_fd, 0);
my_uring_prep_fsync(sqe, data_fd, 0);
data->callback = cb;
op->pending_ops = 1;
op->sync_state = SYNC_DATA_SYNC_SENT;
@@ -96,7 +96,7 @@ int blockstore::continue_sync(blockstore_operation *op)
}
op->max_used_journal_sector = 1 + journal.cur_sector;
// ... And a journal fsync
io_uring_prep_fsync(sqe[s], journal.fd, 0);
my_uring_prep_fsync(sqe[s], journal.fd, 0);
struct ring_data_t *data = ((ring_data_t*)sqe[s]->user_data);
data->callback = cb;
op->pending_ops = 1 + s;