From 3343f3aedfc2f374a5415daf00f97594f87ffed9 Mon Sep 17 00:00:00 2001 Message-Id: <3343f3aedfc2f374a5415daf00f97594f87ffed9.1350493760.git.minovotn@redhat.com> In-Reply-To: References: From: Jeffrey Cody Date: Wed, 17 Oct 2012 05:59:28 +0200 Subject: [PATCH 15/35] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c RH-Author: Jeffrey Cody Message-id: Patchwork-id: 43273 O-Subject: [RHEL6.4 qemu-kvm PATCH v4 15/35] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c Bugzilla: 767233 RH-Acked-by: Paolo Bonzini RH-Acked-by: Eric Blake RH-Acked-by: Kevin Wolf 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 Signed-off-by: Kevin Wolf (cherry picked from commit 9acc5a06d41416400dda0ae9495707236911e234) Conflicts: block/raw-posix.c --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Michal Novotny --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 374b2f2..331513e 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -351,7 +351,7 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs, * boundary. Check if this is the case or telll the low-level * driver that it needs to copy the buffer. */ - if (s->aligned_buf && !qiov_is_aligned(bs, qiov)) { + if ((bs->open_flags & BDRV_O_NOCACHE) && !qiov_is_aligned(bs, qiov)) { type |= QEMU_AIO_MISALIGNED; } -- 1.7.11.7