Statistics
| Branch: | Revision:

root / block-raw-posix.c @ f5049756

History | View | Annotate | Download (32.4 kB)

# Date Author Comment
27463101 09/27/2008 11:58 pm aliguori

Make compatfd fallback more robust

Be more friendly when signalfd() fails, and also add configure checks to detect
that syscall(SYS_signalfd) actually works. malc pointed out that some installs
do not have /usr/include/linux headers that are in sync with the glibc headers...

acce87f9 09/26/2008 07:12 pm aliguori

Really fix the BSD build this time

struct aioinit isn't defined on BSD it appears so we need to guard everything
in an #if defined(linux).

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5325 c046a42c-6fe2-441c-8c8c-71466251a162

0d0ab49a 09/26/2008 07:04 pm aliguori

Fix build on non-Linux unices

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5324 c046a42c-6fe2-441c-8c8c-71466251a162

53538725 09/26/2008 06:59 pm aliguori

Implement an fd pool to get real AIO with posix-aio

This patch implements a simple fd pool to allow many AIO requests with
posix-aio. The result is significantly improved performance (identical to that
reported for linux-aio) for both cache=on and cache=off....

997306fc 09/26/2008 06:52 pm aliguori

Fix build on FreeBSD

__GLIBC_PREREQ is defined in such a way that the ! cannot be used in front of
it on FreeBSD. Also, -lpthread is not implied by the build and we definitely
use it for compatfd support.

While at it, I added a default initialization for posix-aio that seems to...

82889986 09/23/2008 05:57 am aliguori

Relax posix-aio restrictions on newer glibcs

RedHat 9 shipped glibc 2.3. Modern versions of glibc do not have the aio thread
exit issue that the comment references. This patch adjusts the check to only
limit aio_init on glibc versions < 2.4.

Signed-off-by: Anthony Liguori <>...

a76bab49 09/22/2008 10:17 pm aliguori

Refactor AIO to allow multiple AIO implementations

This patch refactors the AIO layer to allow multiple AIO implementations. It's
only possible because of the recent signalfd() patch.

Right now, the AIO infrastructure is pretty specific to the block raw backend....

ad02ad6f 09/22/2008 05:49 pm aliguori

Do not allow AIO to be inited multiple times

This prevents two signalfd() threads from being spawned. This problem was
originally spotted by Blue Swirl.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5289 c046a42c-6fe2-441c-8c8c-71466251a162

2acf5af0 09/16/2008 04:21 pm aliguori

block-raw is not a protocol

The protocol_name "file" was added to the block driver when async IO was
introduced. This can be used to select that a file is treated as a raw
device instead of probing for the type. However, protocols are not subject
to path interpretation which cases qcow2 images with raw base images to not...

08af02e2 09/15/2008 07:48 pm aliguori

Make sure to define fd_open when not on Linux

My previous commit broke the build. This was spotted by C.W. Betts.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5231 c046a42c-6fe2-441c-8c8c-71466251a162

03ff3ca3 09/15/2008 06:51 pm aliguori

Use common objects for qemu-img and qemu-nbd

Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
code. It's ugly and causes us to have to build multiple object files for
linking against qemu and the tools.

This patch introduces a new file, qemu-tool.c which contains enough for...

a3392f9b 09/11/2008 09:00 pm aliguori

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 uses
bdrv calls bdrv_init so it makes sense to init aio from there instead of...

2c41a5f9 09/11/2008 05:32 pm aliguori

Make sure to read siginfo from signalfd

Otherwise, we'll idle at 100% cpu.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5195 c046a42c-6fe2-441c-8c8c-71466251a162

baf35cb9 09/10/2008 06:45 pm aliguori

Use signalfd() to work around signal/select race

This patch introduces signalfd() to work around the signal/select race in
checking for AIO completions. For platforms that don't support signalfd(), we
emulate it with threads.

There was a long discussion about this approach. I don't believe there are any...

543952ca 08/24/2008 01:43 pm blueswir1

Add missing FreeBSD #include (Juergen Lock)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5081 c046a42c-6fe2-441c-8c8c-71466251a162

128ab2ff 08/15/2008 09:33 pm blueswir1

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

414f0dab 08/15/2008 09:20 pm blueswir1

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

2f726488 07/03/2008 02:47 pm ths

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

bed5cc52 05/28/2008 12:51 pm bellard

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

6dd2db52 05/07/2008 06:26 pm blueswir1

Revert 4367

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4377 c046a42c-6fe2-441c-8c8c-71466251a162

adcbebaa 05/06/2008 08:26 pm blueswir1

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

01534fe9 01/06/2008 08:53 pm bellard

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

985a03b0 12/24/2007 06:10 pm ths

Real SCSI device passthrough (v4), by Laurent Vivier.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162

33f00271 12/24/2007 04:33 pm balrog

Add "cache" parameter to "-drive" (Laurent Vivier).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162

223d4670 12/15/2007 07:28 pm ths

Split block-raw.c into block-raw-posix.c and block-raw-win32.c, by
Anthony Liguori.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3814 c046a42c-6fe2-441c-8c8c-71466251a162