Do not use goto resume_0 due to some strange -O3 bug which leads to hangs (it seems it optimizes flush_queue.size() away)
parent
fd13965b90
commit
1f7381e220
|
@ -165,10 +165,6 @@ void blockstore::loop()
|
||||||
{
|
{
|
||||||
dequeue_op = dequeue_stable(op);
|
dequeue_op = dequeue_stable(op);
|
||||||
}
|
}
|
||||||
else if ((op->flags & OP_TYPE_MASK) == OP_DELETE)
|
|
||||||
{
|
|
||||||
// FIXME: Implement DELETE
|
|
||||||
}
|
|
||||||
if (dequeue_op)
|
if (dequeue_op)
|
||||||
{
|
{
|
||||||
submit_queue.erase(op_ptr);
|
submit_queue.erase(op_ptr);
|
||||||
|
|
|
@ -152,7 +152,6 @@ bool journal_flusher_co::loop()
|
||||||
goto resume_17;
|
goto resume_17;
|
||||||
else if (wait_state == 18)
|
else if (wait_state == 18)
|
||||||
goto resume_18;
|
goto resume_18;
|
||||||
resume_0:
|
|
||||||
if (!flusher->flush_queue.size() ||
|
if (!flusher->flush_queue.size() ||
|
||||||
!flusher->start_forced && !flusher->active_flushers && flusher->flush_queue.size() < flusher->sync_threshold)
|
!flusher->start_forced && !flusher->active_flushers && flusher->flush_queue.size() < flusher->sync_threshold)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +178,8 @@ resume_0:
|
||||||
// Another coroutine will see it and re-queue the object after it finishes
|
// Another coroutine will see it and re-queue the object after it finishes
|
||||||
if (repeat_it->second < cur.version)
|
if (repeat_it->second < cur.version)
|
||||||
repeat_it->second = cur.version;
|
repeat_it->second = cur.version;
|
||||||
goto resume_0;
|
wait_state = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
flusher->sync_to_repeat[cur.oid] = 0;
|
flusher->sync_to_repeat[cur.oid] = 0;
|
||||||
|
@ -278,7 +278,8 @@ resume_0:
|
||||||
flusher->unshift_flush({ .oid = cur.oid, .version = repeat_it->second });
|
flusher->unshift_flush({ .oid = cur.oid, .version = repeat_it->second });
|
||||||
}
|
}
|
||||||
flusher->sync_to_repeat.erase(repeat_it);
|
flusher->sync_to_repeat.erase(repeat_it);
|
||||||
goto resume_0;
|
wait_state = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
// Find it in clean_db
|
// Find it in clean_db
|
||||||
{
|
{
|
||||||
|
@ -476,7 +477,8 @@ resume_0:
|
||||||
flusher->unshift_flush({ .oid = cur.oid, .version = repeat_it->second });
|
flusher->unshift_flush({ .oid = cur.oid, .version = repeat_it->second });
|
||||||
}
|
}
|
||||||
flusher->sync_to_repeat.erase(repeat_it);
|
flusher->sync_to_repeat.erase(repeat_it);
|
||||||
goto resume_0;
|
wait_state = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,6 @@ static int bs_init(struct thread_data *td)
|
||||||
{
|
{
|
||||||
bs_options *o = (bs_options*)td->eo;
|
bs_options *o = (bs_options*)td->eo;
|
||||||
bs_data *bsd = (bs_data*)td->io_ops_data;
|
bs_data *bsd = (bs_data*)td->io_ops_data;
|
||||||
int r;
|
|
||||||
|
|
||||||
blockstore_config_t config;
|
blockstore_config_t config;
|
||||||
config["journal_device"] = o->journal_device;
|
config["journal_device"] = o->journal_device;
|
||||||
|
|
Loading…
Reference in New Issue