History | View | Annotate | Download (36.4 kB)
push down vector linearization to posix-aio-compat.c (Christoph Hellwig)
Make all AIO requests vectored and defer linearization until the actualI/O thread. This prepares for using native preadv/pwritev.
Also enables asynchronous direct I/O by handling that case in the I/O thread....
Fix a few Sparse warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162
Fix the build for --disable-aio
This was reported by malc.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6993 c046a42c-6fe2-441c-8c8c-71466251a162
Add host_device support to qemu-img. (Nolan Leake)
This patch allows the use a host_device as the destination for "qemu-imgconvert".
I added a ->bdrv_create function host_device. It merely verifies thatthe device exists and is large enough.
A check is needed in the qemu-img convert loop to ensure that we write...
Fix wrong return value
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6959 c046a42c-6fe2-441c-8c8c-71466251a162
new scsi-generic abstraction, use SG_IO (Christoph Hellwig)
Okay, I started looking into how to handle scsi-generic I/O in thenew world order.
I think the best is to use the SG_IO ioctl instead of the read/writeinterface as that allows us to support scsi passthrough on disk/cdrom...
FreeBSD host physical cdrom fixes
This improves physical cdrom support on FreeBSD hosts to be almost asgood as on Linux, with the only notable exception that you still need toeither have the guest itself eject the disc if you want to take itout/change it, or do a change command in the monitor after taking out...
Fix regression introduced by r6824
The changes introduced by r6824 broke a subtle, and admittedly obscure, aspectof the block API. While bdrv_{pread,pwrite} return the number of bytes reador written upon success, bdrv_{read,write} returns a zero upon success....
Drop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity)
Now that scsi generic no longer uses bdrv_pread() and bdrv_pwrite(), we candrop the corresponding internal APIs, which overlap bdrv_read()/bdrv_write()and, being byte oriented, are unnatural for a block device....
Add internal scsi generic block API (Avi Kivity)
Add an internal API for the generic block layer to send scsi generic commandsto block format driver. This means block format drivers no longer needto consider overloaded nb_sectors parameters.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162
Use C99 initializers for BlockDriver methods
Consistently use the C99 named initializer format for the BlockDrivermethods to make the method table more readable and more easilyextensible.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
fix raw_aio_remove (Stefano Stabellini)
Hi all,this small patch fixes a bug in the list iteration of raw_aio_remove.Cheers,
Stefano
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
block: 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@6527 c046a42c-6fe2-441c-8c8c-71466251a162
fix raw_aio_read\write error handling (Stefano Stabellini)
Currently when qemu_paio_read or qemu_paio_write return an error we callqemu_aio_release without removing the request from the list.I know that in the current implementation qemu_paio_write\read don't return...
Rename sigev_signo to avoid FreeBSD problems (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6414 c046a42c-6fe2-441c-8c8c-71466251a162
Use kill instead of sigqueue: re-enables AIO on OpenBSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6360 c046a42c-6fe2-441c-8c8c-71466251a162
global s/fflush(logfile)/qemu_log_flush()/ (Eduardo Habkost)
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6339 c046a42c-6fe2-441c-8c8c-71466251a162
Convert references to logfile/loglevel to use qemu_log*() macros
This is a large patch that changes all occurrences of logfile/loglevelglobal variables to use the new qemu_log*() macros.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Return -errno on write failure (Gleb Natapov)
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6324 c046a42c-6fe2-441c-8c8c-71466251a162
Replace posix-aio with custom thread pool
glibc implements posix-aio as a thread pool and imposes a number of limitations.
1) it limits one request per-file descriptor. we hack around this by dup()'ingfile descriptors which is hideously ugly
2) it's impossible to add new interfaces and we need a vectored read/write...
block: make raw aio signaling non-blocking (Gerd Hoffman)
This patch switches the read handle of the signaling pipe intonon-blocking mode. This avoids unwanted blocking reads and alsoallows to read all bytes out of the signaling pipe in case we gotsignaled more that once before the handler ran....
Fix previous commit (spotted by Robert Riebisch).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5487 c046a42c-6fe2-441c-8c8c-71466251a162
Define O_DSYNC as O_SYNC if necessary.
O_DSYNC isn't available on OS X.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5486 c046a42c-6fe2-441c-8c8c-71466251a162
Expand cache= option and use write-through caching by default
This patch changes the cache= option to accept none, writeback, or writethoughto control the host page cache behavior. By default, writethrough caching isnow used which internally is implemented by using O_DSYNC to open the disk...
Fix IO performance regression in sparc
Replace signalfd with signal handler/pipe. There is no way to interruptthe CPU execution loop when a file descriptor becomes readable. Thisresults in a large performance regression in sparc emulation duringbootup....
Fix warning about missing return value
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5405 c046a42c-6fe2-441c-8c8c-71466251a162
Make compatfd fallback more robust
Be more friendly when signalfd() fails, and also add configure checks to detectthat syscall(SYS_signalfd) actually works. malc pointed out that some installsdo not have /usr/include/linux headers that are in sync with the glibc headers...
Really fix the BSD build this time
struct aioinit isn't defined on BSD it appears so we need to guard everythingin an #if defined(linux).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5325 c046a42c-6fe2-441c-8c8c-71466251a162
Fix build on non-Linux unices
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5324 c046a42c-6fe2-441c-8c8c-71466251a162
Implement an fd pool to get real AIO with posix-aio
This patch implements a simple fd pool to allow many AIO requests withposix-aio. The result is significantly improved performance (identical to thatreported for linux-aio) for both cache=on and cache=off....
Fix build on FreeBSD
__GLIBC_PREREQ is defined in such a way that the ! cannot be used in front ofit on FreeBSD. Also, -lpthread is not implied by the build and we definitelyuse it for compatfd support.
While at it, I added a default initialization for posix-aio that seems to...
Relax posix-aio restrictions on newer glibcs
RedHat 9 shipped glibc 2.3. Modern versions of glibc do not have the aio threadexit issue that the comment references. This patch adjusts the check to onlylimit aio_init on glibc versions < 2.4.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
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....
Do not allow AIO to be inited multiple times
This prevents two signalfd() threads from being spawned. This problem wasoriginally spotted by Blue Swirl.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5289 c046a42c-6fe2-441c-8c8c-71466251a162
block-raw is not a protocol
The protocol_name "file" was added to the block driver when async IO wasintroduced. This can be used to select that a file is treated as a rawdevice instead of probing for the type. However, protocols are not subjectto path interpretation which cases qcow2 images with raw base images to not...
Make sure to define fd_open when not on Linux
My previous commit broke the build. This was spotted by C.W. Betts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5231 c046a42c-6fe2-441c-8c8c-71466251a162
Use common objects for qemu-img and qemu-nbd
Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over thecode. It's ugly and causes us to have to build multiple object files forlinking against qemu and the tools.
This patch introduces a new file, qemu-tool.c which contains enough for...
Only build compatfd when using AIO and make sure to always init AIO
OpenBSD doesn't use AIO so don't try to build compatfd when not using AIO.
Also make sure to call qemu_aio_init() from bdrv_init. Everything that usesbdrv calls bdrv_init so it makes sense to init aio from there instead of...
Make sure to read siginfo from signalfd
Otherwise, we'll idle at 100% cpu.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5195 c046a42c-6fe2-441c-8c8c-71466251a162
Use signalfd() to work around signal/select race
This patch introduces signalfd() to work around the signal/select race inchecking for AIO completions. For platforms that don't support signalfd(), weemulate it with threads.
There was a long discussion about this approach. I don't believe there are any...
Add missing FreeBSD #include (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5081 c046a42c-6fe2-441c-8c8c-71466251a162
Preliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5012 c046a42c-6fe2-441c-8c8c-71466251a162
Use AIO only if host supports it (based on OpenBSD patches by Todd T. Fries)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5010 c046a42c-6fe2-441c-8c8c-71466251a162
Add a parameter to disable host cache, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4836 c046a42c-6fe2-441c-8c8c-71466251a162
Align file accesses with cache=off (O_DIRECT) (Kevin Wolf, Laurent Vivier)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4599 c046a42c-6fe2-441c-8c8c-71466251a162
Revert 4367
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4377 c046a42c-6fe2-441c-8c8c-71466251a162
Align file accesses with cache=off (Kevin Wolf, Laurent Vivier)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4367 c046a42c-6fe2-441c-8c8c-71466251a162
restore original values for ai.aio_threads and ai.aio_num
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3896 c046a42c-6fe2-441c-8c8c-71466251a162
Real SCSI device passthrough (v4), by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Split block-raw.c into block-raw-posix.c and block-raw-win32.c, byAnthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3814 c046a42c-6fe2-441c-8c8c-71466251a162