Rename space_check.sectors_required to sectors_to_write

This commit is contained in:
Vitaliy Filippov
2021-02-02 01:30:23 +03:00
parent 9b5d8b9ad4
commit 534a4a657e
5 changed files with 14 additions and 15 deletions
+3 -3
View File
@@ -98,8 +98,8 @@ int blockstore_impl_t::dequeue_stable(blockstore_op_t *op)
return 0;
}
// There is sufficient space. Get SQEs
struct io_uring_sqe *sqe[space_check.sectors_required];
for (i = 0; i < space_check.sectors_required; i++)
struct io_uring_sqe *sqe[space_check.sectors_to_write];
for (i = 0; i < space_check.sectors_to_write; i++)
{
BS_SUBMIT_GET_SQE_DECL(sqe[i]);
}
@@ -125,7 +125,7 @@ int blockstore_impl_t::dequeue_stable(blockstore_op_t *op)
journal.crc32_last = je->crc32;
}
prepare_journal_sector_write(journal, journal.cur_sector, sqe[s++], cb);
assert(s == space_check.sectors_required);
assert(s == space_check.sectors_to_write);
if (cur_sector == -1)
PRIV(op)->min_flushed_journal_sector = 1 + journal.cur_sector;
PRIV(op)->max_flushed_journal_sector = 1 + journal.cur_sector;