Rename big_write.block to location

blocking-uring-test
Vitaliy Filippov 2019-11-12 20:55:17 +03:00
parent bb55a7fbf4
commit ae77a228c7
4 changed files with 5 additions and 5 deletions

View File

@ -310,7 +310,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t len)
}, (dirty_entry){
.state = ST_D_META_SYNCED,
.flags = 0,
.location = je->big_write.block,
.location = je->big_write.location,
.offset = 0,
.size = bs->block_size,
});

View File

@ -49,7 +49,7 @@ struct __attribute__((__packed__)) journal_entry_big_write
uint32_t crc32_prev;
object_id oid;
uint64_t version;
uint64_t block;
uint64_t location;
};
struct __attribute__((__packed__)) journal_entry_stable

View File

@ -79,7 +79,7 @@ int blockstore::continue_sync(blockstore_operation *op)
prefill_single_journal_entry(journal, JE_BIG_WRITE, sizeof(journal_entry_big_write));
je->oid = it->oid;
je->version = it->version;
je->block = dirty_db[*it].location;
je->location = dirty_db[*it].location;
je->crc32 = je_crc32((journal_entry*)je);
journal.crc32_last = je->crc32;
it++;

View File

@ -81,8 +81,8 @@ int blockstore::dequeue_write(blockstore_operation *op)
if (op->version == 1 && op->len != block_size)
{
// zero fill newly allocated object
// FIXME: it's not so good because it turns new small writes into big writes
// but it's the first and the simplest implementation
// This thing turns new small writes into big writes
// So FIXME: consider writing an empty big_write as version 1 instead of zero-filling here
if (op->offset > 0)
op->iov_zerofill[vcnt++] = (struct iovec){ zero_object, op->offset };
op->iov_zerofill[vcnt++] = (struct iovec){ op->buf, op->len };