forked from vitalif/vitastor
Use common macro for get_sqe
parent
d1526b415f
commit
299d7d7c95
|
@ -126,11 +126,8 @@ resume_2:
|
||||||
resume_3:
|
resume_3:
|
||||||
if (!disable_journal_fsync)
|
if (!disable_journal_fsync)
|
||||||
{
|
{
|
||||||
io_uring_sqe *sqe = get_sqe();
|
io_uring_sqe *sqe;
|
||||||
if (!sqe)
|
BS_SUBMIT_GET_SQE_DECL(sqe);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ring_data_t *data = ((ring_data_t*)sqe->user_data);
|
ring_data_t *data = ((ring_data_t*)sqe->user_data);
|
||||||
my_uring_prep_fsync(sqe, journal.fd, IORING_FSYNC_DATASYNC);
|
my_uring_prep_fsync(sqe, journal.fd, IORING_FSYNC_DATASYNC);
|
||||||
data->iov = { 0 };
|
data->iov = { 0 };
|
||||||
|
|
|
@ -150,11 +150,8 @@ resume_2:
|
||||||
resume_3:
|
resume_3:
|
||||||
if (!disable_journal_fsync)
|
if (!disable_journal_fsync)
|
||||||
{
|
{
|
||||||
io_uring_sqe *sqe = get_sqe();
|
io_uring_sqe *sqe;
|
||||||
if (!sqe)
|
BS_SUBMIT_GET_SQE_DECL(sqe);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ring_data_t *data = ((ring_data_t*)sqe->user_data);
|
ring_data_t *data = ((ring_data_t*)sqe->user_data);
|
||||||
my_uring_prep_fsync(sqe, journal.fd, IORING_FSYNC_DATASYNC);
|
my_uring_prep_fsync(sqe, journal.fd, IORING_FSYNC_DATASYNC);
|
||||||
data->iov = { 0 };
|
data->iov = { 0 };
|
||||||
|
|
|
@ -401,11 +401,7 @@ int blockstore_impl_t::continue_write(blockstore_op_t *op)
|
||||||
goto resume_4;
|
goto resume_4;
|
||||||
resume_2:
|
resume_2:
|
||||||
// Only for the immediate_commit mode: prepare and submit big_write journal entry
|
// Only for the immediate_commit mode: prepare and submit big_write journal entry
|
||||||
sqe = get_sqe();
|
BS_SUBMIT_GET_SQE_DECL(sqe);
|
||||||
if (!sqe)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
je = (journal_entry_big_write*)prefill_single_journal_entry(
|
je = (journal_entry_big_write*)prefill_single_journal_entry(
|
||||||
journal, op->opcode == BS_OP_WRITE_STABLE ? JE_BIG_WRITE_INSTANT : JE_BIG_WRITE,
|
journal, op->opcode == BS_OP_WRITE_STABLE ? JE_BIG_WRITE_INSTANT : JE_BIG_WRITE,
|
||||||
sizeof(journal_entry_big_write)
|
sizeof(journal_entry_big_write)
|
||||||
|
|
Loading…
Reference in New Issue