From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG9cs-0007OG-Ru for qemu-devel@nongnu.org; Mon, 24 Sep 2012 10:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG9ck-00078h-Sy for qemu-devel@nongnu.org; Mon, 24 Sep 2012 10:27:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG9ck-00078Y-K7 for qemu-devel@nongnu.org; Mon, 24 Sep 2012 10:27:02 -0400 From: Kevin Wolf Date: Mon, 24 Sep 2012 16:26:37 +0200 Message-Id: <1348496808-8159-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1348496808-8159-1-git-send-email-kwolf@redhat.com> References: <1348496808-8159-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 08/19] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Jeff Cody 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 --- block/raw-posix.c | 2 +- 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 -- 1.7.6.5