From: Ian Jackson Date: Wed, 22 Oct 2008 17:08:52 +0000 (+0100) Subject: Merge branch 'upstream' into qemu X-Git-Tag: t.master-before-merge~69^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=66ac44284e4cd259cb97f88d4fe732d96cd1694f;p=qemu-xen-4.5-testing.git Merge branch 'upstream' into qemu Conflicts: block.h linux-user/elfload.c --- 66ac44284e4cd259cb97f88d4fe732d96cd1694f diff --cc block.h index 218c7901d,72c1c24bb..77fec156b --- a/block.h +++ b/block.h @@@ -47,10 -47,11 +47,14 @@@ typedef struct QEMUSnapshotInfo use a disk image format on top of it (default for bdrv_file_open()) */ - #define BDRV_O_DIRECT 0x0020 + #define BDRV_O_NOCACHE 0x0020 /* do not use the host page cache */ + #define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */ + + #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) + +#define BDRV_O_EXTENDABLE 0x0080 /* allow writes out of original size range; + only effective for some drivers */ + void bdrv_info(void); void bdrv_info_stats(void); diff --cc hw/scsi-disk.c index d28776191,f7aa6d7a4..a6dee5026 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@@ -276,16 -281,6 +281,16 @@@ static uint8_t *scsi_get_buf(SCSIDevic return r->dma_buf; } +static void scsi_flush_cb(void *opaque, int ret) { + SCSIRequest *r = opaque; + if (ret) { + BADF("IO error on flush: %s\n", strerror(-ret)); - scsi_command_complete(r, SENSE_HARDWARE_ERROR); ++ scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR); + } else { - scsi_command_complete(r, SENSE_NO_SENSE); ++ scsi_command_complete(r, STATUS_GOOD, SENSE_NO_SENSE); + } +} + /* Execute a scsi command. Returns the length of the data expected by the command. This will be Positive for data transfers from the device (eg. disk reads), negative for transfers to the device (eg. disk writes),