From 53fec9d3fd3d3a4ded4b92dfa843436bf71380f1 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 28 Nov 2011 16:08:47 +0000 Subject: 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 Signed-off-by: Kevin Wolf --- block_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block_int.h') 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; -- cgit v1.2.1