qed: Remove recursion in qed_aio_next_io()

Instead of calling itself recursively as the last thing, just convert
qed_aio_next_io() into a loop.

This patch is best reviewed with 'git show -w' because most of it is
just whitespace changes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Kevin Wolf 2016-11-18 14:16:42 +01:00
parent dddf8db10b
commit 018598747c
1 changed files with 37 additions and 36 deletions

View File

@ -1280,6 +1280,7 @@ static void qed_aio_next_io(QEDAIOCB *acb)
size_t len;
int ret;
while (1) {
trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size);
if (acb->backing_qiov) {
@ -1318,7 +1319,7 @@ static void qed_aio_next_io(QEDAIOCB *acb)
}
return;
}
qed_aio_next_io(acb);
}
}
static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,