On 02/22/11 12:44, Kevin Wolf wrote:
>> @@ -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

I guess we could retry the last part of the request, but if we already
have an error, it seems silly to try to rewrite the same stuff again
just to obtain the error code.

I looked through the aio calls and I didn't find any obvious way to
retrieve the error code, but maybe I missed something?

Cheers,
Jes


Reply via email to