History | View | Annotate | Download (4.9 kB)
aio: simplify qemu_aio_wait
The do...while loop can never loop, because select will just not return0 when invoked with infinite timeout.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
aio: return "AIO in progress" state from qemu_aio_wait
The definition of when qemu_aio_flush should loop is much simplerthan it looks. It just has to call qemu_aio_wait until it makesno progress and all flush callbacks return false. qemu_aio_waitis the logical place to tell the caller about this....
aio: remove process_queue callback and qemu_aio_process_queue
Both unused after the previous patch.
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: fix aio_flush segfaults for read-only protocols (e.g. curl)
Not all block format drivers expose an io_flush method (reasonable forread-only protocols), so calling io_flush there will immediately segfault.
Fix by checking for the method's existence before calling it....
Add qemu_aio_process_queue()
We'll leave some AIO completions unhandled when we can't call the callback.qemu_aio_process_queue() is used later to run any callbacks that are left andcan be run then.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Handle BH's queued by AIO completions in qemu_aio_flush()
Without this, the call to qemu_aio_flush during migration doesn'tactually flush all in-flight SCSI IOs.
Signed-off-by: Nolan Leake <nolan <at> sigbus.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fix qemu_aio_flush
qemu_aio_wait by invoking the bh or one of the aio completioncallbacks, could end up submitting new pending aio, breaking theinvariant that qemu_aio_flush returns only when no pending aio isoutstanding (possibly a problem for migration as such)....
AIO deletion race fix
When deleting an fd event there is a chance the object doesn't getdeleted, but only ->deleted set positive and deleted somewhere later.
Now, if we create a handler for the fd again before the actualdeletion occurs, we end up writing data into an object that has...
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Make sure to initialize fd_sets in aio.c
This was spotted by valgrind.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5470 c046a42c-6fe2-441c-8c8c-71466251a162
Refactor AIO to allow multiple AIO implementations
This patch refactors the AIO layer to allow multiple AIO implementations. It'sonly possible because of the recent signalfd() patch.
Right now, the AIO infrastructure is pretty specific to the block raw backend....