diff options
author | Christoph Hellwig <hch@lst.de> | 2009-09-04 19:02:23 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-11 10:19:46 -0500 |
commit | aa659be3dc2aa86614bcf6960f9d4af2a4362156 (patch) | |
tree | 86739e8a381966394455528f26880d5de82a436b /hw/virtio-blk.h | |
parent | b0484ae464dcd8ee7439c4257b2f40d6b0e007dd (diff) | |
download | qemu-aa659be3dc2aa86614bcf6960f9d4af2a4362156.zip qemu-aa659be3dc2aa86614bcf6960f9d4af2a4362156.tar.gz qemu-aa659be3dc2aa86614bcf6960f9d4af2a4362156.tar.bz2 |
virtio-blk: add volatile writecache feature
Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we have
a volatile write cache that needs controlled flushing. Implement a
VIRTIO_BLK_T_FLUSH operation to flush it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-blk.h')
-rw-r--r-- | hw/virtio-blk.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h index 1be4342..23ad74c 100644 --- a/hw/virtio-blk.h +++ b/hw/virtio-blk.h @@ -31,6 +31,7 @@ #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ #define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */ +#define VIRTIO_BLK_F_WCACHE 9 /* write cache enabled */ #define VIRTIO_BLK_ID_LEN 256 /* length of identify u16 array */ #define VIRTIO_BLK_ID_SN 10 /* start of char * serial# */ @@ -55,6 +56,9 @@ struct virtio_blk_config /* This bit says it's a scsi command, not an actual read or write. */ #define VIRTIO_BLK_T_SCSI_CMD 2 +/* Flush the volatile write cache */ +#define VIRTIO_BLK_T_FLUSH 4 + /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 |