mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
block: implement reference count for BlockDriverState
Introduce bdrv_ref/bdrv_unref to manage the lifecycle of BlockDriverState. They are unused for now but will used to replace bdrv_delete() later. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
13c91cb7e2
commit
9fcb025146
3 changed files with 24 additions and 0 deletions
|
@ -277,6 +277,7 @@ struct BlockDriverState {
|
|||
BlockDeviceIoStatus iostatus;
|
||||
char device_name[32];
|
||||
HBitmap *dirty_bitmap;
|
||||
int refcnt;
|
||||
int in_use; /* users other than guest access, eg. block migration */
|
||||
QTAILQ_ENTRY(BlockDriverState) list;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue