mirror of https://github.com/schoebel/mars
aio: fix dirty_stage
This commit is contained in:
parent
2cd47f430a
commit
a35585325d
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue