]> git.proxmox.com Git - qemu.git/blobdiff - block_int.h
rtl8139: use TARGET_FMT_plx in debug messages
[qemu.git] / block_int.h
index 12663e817d869e07e69a7b89286ee633832b5ce8..545ad11ff35c75d8a503e91dcbd385869f61a5fa 100644 (file)
@@ -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 */
@@ -199,10 +199,14 @@ struct BlockDriverState {
     char device_name[32];
     unsigned long *dirty_bitmap;
     int64_t dirty_count;
+    int in_use; /* users other than guest access, eg. block migration */
     QTAILQ_ENTRY(BlockDriverState) list;
     void *private;
 };
 
+#define CHANGE_MEDIA   0x01
+#define CHANGE_SIZE    0x02
+
 struct BlockDriverAIOCB {
     AIOPool *pool;
     BlockDriverState *bs;