Commit 01859874 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

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: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent dddf8db1
Loading
Loading
Loading
Loading
+32 −31
Original line number Diff line number Diff line
@@ -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,