qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 08/19] block: use BDRV_O_NOCACHE instead of s->align


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 08/19] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c
Date: Mon, 24 Sep 2012 16:26:37 +0200

From: Jeff Cody <address@hidden>

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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]