Do not use modified_block(ui32) to store lsn(ui64)
This commit is contained in:
@@ -16,6 +16,7 @@ int blockstore_impl_t::dequeue_stable(blockstore_op_t *op)
|
|||||||
else if (priv->op_state == 5) goto resume_5;
|
else if (priv->op_state == 5) goto resume_5;
|
||||||
assert(!priv->op_state);
|
assert(!priv->op_state);
|
||||||
op->retval = 0;
|
op->retval = 0;
|
||||||
|
PRIV(op)->lsn = 0;
|
||||||
priv->modified_block = priv->modified_block2 = UINT32_MAX;
|
priv->modified_block = priv->modified_block2 = UINT32_MAX;
|
||||||
for (priv->stab_pos = 0; priv->stab_pos < op->len; priv->stab_pos++)
|
for (priv->stab_pos = 0; priv->stab_pos < op->len; priv->stab_pos++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ int blockstore_impl_t::continue_sync(blockstore_op_t *op)
|
|||||||
if (!PRIV(op)->op_state)
|
if (!PRIV(op)->op_state)
|
||||||
{
|
{
|
||||||
op->retval = 0;
|
op->retval = 0;
|
||||||
|
PRIV(op)->lsn = 0;
|
||||||
}
|
}
|
||||||
int res = do_sync(op, 0);
|
int res = do_sync(op, 0);
|
||||||
if (res == 2)
|
if (res == 2)
|
||||||
@@ -104,7 +105,8 @@ int blockstore_impl_t::do_sync(blockstore_op_t *op, int base_state)
|
|||||||
unsynced_data_write_count = unsynced_buffer_write_count = unsynced_meta_write_count = 0;
|
unsynced_data_write_count = unsynced_buffer_write_count = unsynced_meta_write_count = 0;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
PRIV(op)->modified_block = heap->get_completed_lsn();
|
assert(!PRIV(op)->lsn);
|
||||||
|
PRIV(op)->lsn = heap->get_completed_lsn();
|
||||||
if (!submit_fsyncs(PRIV(op)->pending_ops))
|
if (!submit_fsyncs(PRIV(op)->pending_ops))
|
||||||
{
|
{
|
||||||
PRIV(op)->wait_detail = 1;
|
PRIV(op)->wait_detail = 1;
|
||||||
@@ -118,6 +120,6 @@ resume_1:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
resume_2:
|
resume_2:
|
||||||
heap->mark_lsn_fsynced(PRIV(op)->modified_block);
|
heap->mark_lsn_fsynced(PRIV(op)->lsn);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user