aboutsummaryrefslogtreecommitdiff
path: root/include/block/block_int.h
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2013-08-23 09:14:46 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2013-09-06 15:25:08 +0200
commit9fcb025146676ab376e6159b58f5a5ddb67bf03c (patch)
tree1b642880bf42f0943ae9533b1fa78f933022b183 /include/block/block_int.h
parent13c91cb7e28b47f5c4227f7e88a1378570117704 (diff)
downloadqemu-9fcb025146676ab376e6159b58f5a5ddb67bf03c.zip
qemu-9fcb025146676ab376e6159b58f5a5ddb67bf03c.tar.gz
qemu-9fcb025146676ab376e6159b58f5a5ddb67bf03c.tar.bz2
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>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r--include/block/block_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index c3c9c61..b9212b8 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -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;