diff options
author | Avi Kivity <avi@redhat.com> | 2009-08-30 16:35:57 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-08-30 16:35:57 +0300 |
commit | efa7bc7126dc4ede14958efe955edd7a72e49a85 (patch) | |
tree | d21b00a2b9a71174ed3de37c90f1ad36436baadf /block/raw-posix.c | |
parent | Merge commit 'c2882b96545eeabf16767c6effa836e6f9991018' into upstream-merge (diff) | |
parent | Fix gcc 3 warning: comparison is always true due to limited range of data type (diff) | |
download | qemu-kvm-efa7bc7126dc4ede14958efe955edd7a72e49a85.tar.gz qemu-kvm-efa7bc7126dc4ede14958efe955edd7a72e49a85.tar.bz2 qemu-kvm-efa7bc7126dc4ede14958efe955edd7a72e49a85.zip |
Merge commit '757506d282c3c579368055b1bf50fa4056dbe5bc' into upstream-merge
* commit '757506d282c3c579368055b1bf50fa4056dbe5bc': (24 commits)
Fix gcc 3 warning: comparison is always true due to limited range of data type
Fix gcc 3 warning about uninitialized variable
Sparc32: port Slavio misc devices to VMState design
Sparc32: port ECC memory controller to VMState design
Sparc32: port IOMMU to VMState design
Sparc32: port DMA controller to VMState design
Sparc32: port TCX to VMState design
Sparc32: port interrupt controller to VMState design
Update OpenBIOS images to r569
Suppress kraxelisms
Fix Sparc64 breakage: add dummy ISA irqs
Fix merge of 59f2a78793b6d17634f39646d604e84af51e0919
Don't compile aio code if CONFIG_LINUX_AIO is undefined
Fix sb16 breakage due to unassigned s->irq
Fix formatting
linux-user: Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets
linux-user: zero fstat buffer to initialize nsec fields
linux-user: fadvise64 implementation
linux-user: enable getdents for > 32-bit systems
linux-user: fcntl fixes for LTP
...
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r-- | block/raw-posix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index cb9e244f5..f9792d911 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -117,7 +117,9 @@ typedef struct BDRVRawState { int fd_got_error; int fd_media_changed; #endif +#ifdef CONFIG_LINUX_AIO int use_aio; +#endif uint8_t* aligned_buf; } BDRVRawState; @@ -185,7 +187,9 @@ static int raw_open_common(BlockDriverState *bs, const char *filename, if (!s->aio_ctx) { goto out_free_buf; } +#ifdef CONFIG_LINUX_AIO s->use_aio = 0; +#endif } return 0; @@ -544,9 +548,11 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs, if (s->aligned_buf) { if (!qiov_is_aligned(qiov)) { type |= QEMU_AIO_MISALIGNED; +#ifdef CONFIG_LINUX_AIO } else if (s->use_aio) { return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, - nb_sectors, cb, opaque, type); + nb_sectors, cb, opaque, type); +#endif } } |