mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
6d4a2b3a47
commit
db97ee6a97
5 changed files with 25 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue