Am 22.02.2011 11:18, schrieb jes.soren...@redhat.com: > From: Jes Sorensen <jes.soren...@redhat.com> > > Signed-off-by: Jes Sorensen <jes.soren...@redhat.com> > --- > linux-aio.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/linux-aio.c b/linux-aio.c > index 68f4b3d..d9c0225 100644 > --- a/linux-aio.c > +++ b/linux-aio.c > @@ -32,6 +32,7 @@ struct qemu_laiocb { > ssize_t ret; > size_t nbytes; > int async_context_id; > + int type; > QLIST_ENTRY(qemu_laiocb) node; > }; > > @@ -62,6 +63,9 @@ static void qemu_laio_process_completion(struct > qemu_laio_state *s, > if (ret != -ECANCELED) { > if (ret == laiocb->nbytes) > ret = 0; > + else if ((laiocb->type == QEMU_AIO_WRITE) && (ret >= 0) && > + (ret < laiocb->nbytes)) > + ret = -ENOSPC; > else if (ret >= 0) > ret = -EINVAL;
Isn't there a way to get the real error code instead of just making it up more cleverly? Like retrying for the rest of the request? Kevin