Patchwork [2/2] scsi-disk: Don't peek behind the BlockDriverState abstraction

login
register
mail settings
Submitter Markus Armbruster
Date June 5, 2012, 2:49 p.m.
Message ID <1338907765-22078-3-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/163090/
State New
Headers show

Comments

Markus Armbruster - June 5, 2012, 2:49 p.m.
Use the appropriate interface instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/scsi-disk.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 045c764..1bfefb2 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -34,7 +34,6 @@  do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
 #include "scsi-defs.h"
 #include "sysemu.h"
 #include "blockdev.h"
-#include "block_int.h"
 #include "dma.h"
 
 #ifdef __linux
@@ -1877,7 +1876,7 @@  static SCSIRequest *scsi_block_new_request(SCSIDevice *d, uint32_t tag,
 	 * ones (such as WRITE SAME or EXTENDED COPY, etc.).  So, without
 	 * O_DIRECT everything must go through SG_IO.
          */
-        if (!(s->qdev.conf.bs->open_flags & BDRV_O_NOCACHE)) {
+        if (bdrv_get_flags(s->qdev.conf.bs) & BDRV_O_NOCACHE) {
             break;
         }