summaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-11-28 16:08:47 +0000
committerKevin Wolf <kwolf@redhat.com>2011-12-05 14:51:38 +0100
commit53fec9d3fd3d3a4ded4b92dfa843436bf71380f1 (patch)
tree7d819dc00ebd08495bcc3b6649e4bbd7d1536a39 /block_int.h
parentdbffbdcfff69431b622866ac5ea78df74fdc02d4 (diff)
block: add interface to toggle copy-on-read
The bdrv_enable_copy_on_read()/bdrv_disable_copy_on_read() functions can be used to programmatically enable or disable copy-on-read for a block device. Later patches add the actual copy-on-read logic. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index ea818e4e71..311bd2a6fa 100644
--- a/block_int.h
+++ b/block_int.h
@@ -198,6 +198,8 @@ struct BlockDriverState {
int encrypted; /* if true, the media is encrypted */
int valid_key; /* if true, a valid encryption key has been set */
int sg; /* if true, the device is a /dev/sg* */
+ int copy_on_read; /* if true, copy read backing sectors into image
+ note this is a reference count */
BlockDriver *drv; /* NULL means no media */
void *opaque;