aio: fix dirty_stage

This commit is contained in:
Thomas Schoebel-Theuer 2014-04-19 23:31:04 +02:00
parent 2cd47f430a
commit a35585325d
1 changed files with 3 additions and 1 deletions

View File

@ -866,18 +866,20 @@ static int aio_submit_thread(void *data)
sleeptime = 1; sleeptime = 1;
for (;;) { for (;;) {
mref_a->di.dirty_stage = 1;
status = aio_submit(output, mref_a, false); status = aio_submit(output, mref_a, false);
if (likely(status != -EAGAIN)) { if (likely(status != -EAGAIN)) {
mref_a->di.dirty_stage = 1;
break; break;
} }
mref_a->di.dirty_stage = 0;
atomic_inc(&output->total_delay_count); atomic_inc(&output->total_delay_count);
brick_msleep(sleeptime); brick_msleep(sleeptime);
if (sleeptime < 100) { if (sleeptime < 100) {
sleeptime++; sleeptime++;
} }
} }
error: error:
if (unlikely(status < 0)) { if (unlikely(status < 0)) {
MARS_IO("submit_count = %d status = %d\n", atomic_read(&output->submit_count), status); MARS_IO("submit_count = %d status = %d\n", atomic_read(&output->submit_count), status);