aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2012-09-20 15:13:23 -0400
committerKevin Wolf <kwolf@redhat.com>2012-09-24 15:15:11 +0200
commit9acc5a06d41416400dda0ae9495707236911e234 (patch)
tree3e05ee2244b0b238f20932a7c21b35704b0a5216 /block
parent39c9fb9565613a5ca0ae6e83ea115585f91527bb (diff)
downloadqemu-9acc5a06d41416400dda0ae9495707236911e234.zip
qemu-9acc5a06d41416400dda0ae9495707236911e234.tar.gz
qemu-9acc5a06d41416400dda0ae9495707236911e234.tar.bz2
block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c
Rather than check for a non-NULL aligned_buf to determine if raw_aio_submit needs to check for alignment, check for the presence of BDRV_O_NOCACHE in the bs->open_flags. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/raw-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 288e7ff..1e727eb 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -354,7 +354,7 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs,
* boundary. Check if this is the case or tell the low-level
* driver that it needs to copy the buffer.
*/
- if (s->aligned_buf) {
+ if ((bs->open_flags & BDRV_O_NOCACHE)) {
if (!qiov_is_aligned(bs, qiov)) {
type |= QEMU_AIO_MISALIGNED;
#ifdef CONFIG_LINUX_AIO