Rename big_write.block to location
parent
bb55a7fbf4
commit
ae77a228c7
|
@ -310,7 +310,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t len)
|
||||||
}, (dirty_entry){
|
}, (dirty_entry){
|
||||||
.state = ST_D_META_SYNCED,
|
.state = ST_D_META_SYNCED,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.location = je->big_write.block,
|
.location = je->big_write.location,
|
||||||
.offset = 0,
|
.offset = 0,
|
||||||
.size = bs->block_size,
|
.size = bs->block_size,
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct __attribute__((__packed__)) journal_entry_big_write
|
||||||
uint32_t crc32_prev;
|
uint32_t crc32_prev;
|
||||||
object_id oid;
|
object_id oid;
|
||||||
uint64_t version;
|
uint64_t version;
|
||||||
uint64_t block;
|
uint64_t location;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct __attribute__((__packed__)) journal_entry_stable
|
struct __attribute__((__packed__)) journal_entry_stable
|
||||||
|
|
|
@ -79,7 +79,7 @@ int blockstore::continue_sync(blockstore_operation *op)
|
||||||
prefill_single_journal_entry(journal, JE_BIG_WRITE, sizeof(journal_entry_big_write));
|
prefill_single_journal_entry(journal, JE_BIG_WRITE, sizeof(journal_entry_big_write));
|
||||||
je->oid = it->oid;
|
je->oid = it->oid;
|
||||||
je->version = it->version;
|
je->version = it->version;
|
||||||
je->block = dirty_db[*it].location;
|
je->location = dirty_db[*it].location;
|
||||||
je->crc32 = je_crc32((journal_entry*)je);
|
je->crc32 = je_crc32((journal_entry*)je);
|
||||||
journal.crc32_last = je->crc32;
|
journal.crc32_last = je->crc32;
|
||||||
it++;
|
it++;
|
||||||
|
|
|
@ -81,8 +81,8 @@ int blockstore::dequeue_write(blockstore_operation *op)
|
||||||
if (op->version == 1 && op->len != block_size)
|
if (op->version == 1 && op->len != block_size)
|
||||||
{
|
{
|
||||||
// zero fill newly allocated object
|
// zero fill newly allocated object
|
||||||
// FIXME: it's not so good because it turns new small writes into big writes
|
// This thing turns new small writes into big writes
|
||||||
// but it's the first and the simplest implementation
|
// So FIXME: consider writing an empty big_write as version 1 instead of zero-filling here
|
||||||
if (op->offset > 0)
|
if (op->offset > 0)
|
||||||
op->iov_zerofill[vcnt++] = (struct iovec){ zero_object, op->offset };
|
op->iov_zerofill[vcnt++] = (struct iovec){ zero_object, op->offset };
|
||||||
op->iov_zerofill[vcnt++] = (struct iovec){ op->buf, op->len };
|
op->iov_zerofill[vcnt++] = (struct iovec){ op->buf, op->len };
|
||||||
|
|
Loading…
Reference in New Issue