Do not block stabilize by list and list by write
This commit is contained in:
@@ -40,7 +40,12 @@ int blockstore_impl_t::dequeue_rollback(blockstore_op_t *op)
|
||||
}
|
||||
while (dirty_it->first.oid == v->oid && dirty_it->first.version > v->version)
|
||||
{
|
||||
if (!IS_SYNCED(dirty_it->second.state) ||
|
||||
if (IS_IN_FLIGHT(dirty_it->second.state))
|
||||
{
|
||||
// Object write is still in progress. Wait until the write request completes
|
||||
return 0;
|
||||
}
|
||||
else if (!IS_SYNCED(dirty_it->second.state) ||
|
||||
IS_STABLE(dirty_it->second.state))
|
||||
{
|
||||
op->retval = -EBUSY;
|
||||
@@ -103,7 +108,6 @@ int blockstore_impl_t::dequeue_rollback(blockstore_op_t *op)
|
||||
PRIV(op)->max_flushed_journal_sector = 1 + journal.cur_sector;
|
||||
PRIV(op)->pending_ops = s;
|
||||
PRIV(op)->op_state = 1;
|
||||
inflight_writes++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -145,7 +149,6 @@ resume_5:
|
||||
mark_rolled_back(*v);
|
||||
}
|
||||
journal.trim();
|
||||
inflight_writes--;
|
||||
// Acknowledge op
|
||||
op->retval = 0;
|
||||
FINISH_OP(op);
|
||||
@@ -205,7 +208,6 @@ void blockstore_impl_t::handle_rollback_event(ring_data_t *data, blockstore_op_t
|
||||
live = true;
|
||||
if (data->res != data->iov.iov_len)
|
||||
{
|
||||
inflight_writes--;
|
||||
throw std::runtime_error(
|
||||
"write operation failed ("+std::to_string(data->res)+" != "+std::to_string(data->iov.iov_len)+
|
||||
"). in-memory state is corrupted. AAAAAAAaaaaaaaaa!!!111"
|
||||
|
||||
Reference in New Issue
Block a user