aboutsummaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-01-24 13:32:41 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:03:00 +0100
commitdb97ee6a976bacbb0d18818e951cfc41b39269a7 (patch)
tree14c8b30a7b745f84da878aab6f35220dd701b79f /block_int.h
parent6d4a2b3a47959f02e7f307f50396e70e8464f95e (diff)
downloadqemu-db97ee6a976bacbb0d18818e951cfc41b39269a7.zip
qemu-db97ee6a976bacbb0d18818e951cfc41b39269a7.tar.gz
qemu-db97ee6a976bacbb0d18818e951cfc41b39269a7.tar.bz2
block: tell drivers about an image resize
Extend the change_cb callback with a reason argument, and use it to tell drivers about size changes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/block_int.h b/block_int.h
index 12663e8..6ebdc3e 100644
--- a/block_int.h
+++ b/block_int.h
@@ -153,7 +153,7 @@ struct BlockDriverState {
int valid_key; /* if true, a valid encryption key has been set */
int sg; /* if true, the device is a /dev/sg* */
/* event callback when inserting/removing */
- void (*change_cb)(void *opaque);
+ void (*change_cb)(void *opaque, int reason);
void *change_opaque;
BlockDriver *drv; /* NULL means no media */
@@ -203,6 +203,9 @@ struct BlockDriverState {
void *private;
};
+#define CHANGE_MEDIA 0x01
+#define CHANGE_SIZE 0x02
+
struct BlockDriverAIOCB {
AIOPool *pool;
BlockDriverState *bs;