diff --git a/kernel/mars_aio.c b/kernel/mars_aio.c index 2d0d81e8..4293e186 100644 --- a/kernel/mars_aio.c +++ b/kernel/mars_aio.c @@ -866,18 +866,20 @@ static int aio_submit_thread(void *data) sleeptime = 1; for (;;) { + mref_a->di.dirty_stage = 1; status = aio_submit(output, mref_a, false); if (likely(status != -EAGAIN)) { - mref_a->di.dirty_stage = 1; break; } + mref_a->di.dirty_stage = 0; atomic_inc(&output->total_delay_count); brick_msleep(sleeptime); if (sleeptime < 100) { sleeptime++; } } + error: if (unlikely(status < 0)) { MARS_IO("submit_count = %d status = %d\n", atomic_read(&output->submit_count), status);