qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] aio-posix: Fix return value of aio_poll()


From: Dietmar Maurer
Subject: Re: [Qemu-devel] [PATCH] aio-posix: Fix return value of aio_poll()
Date: Thu, 24 Jan 2013 07:42:57 +0000

> > But when I use a thread it triggers the bug in bdrv_drain_all(). So
> > how can I fix  bdrv_drain_all() if I use a separate thread to write data?
> 
> The bug is, in all likelihood, in your own code.  Sorry. :)

yes. I still not fully understand that aio code.

If I detect a incomplete write, I register an aio handler like this:

        ret = write(fd, buf, count) 
         if (ret < 0 && (errno == EAGAIN || errno == EWOULDBLOCK) ) {
              ...
              qemu_aio_set_fd_handler(fd, NULL, vma_co_continue_write,  NULL, 
mydata);
              qemu_coroutine_yield();

But seems that qemu_aio_wait() returns false after that.

I thought that should return true instead?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]