diff options
author | Max Reitz <mreitz@redhat.com> | 2016-01-29 16:36:12 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-02-02 17:50:46 +0100 |
commit | 9c4218e957331e1ba0ba7565730b0b71c49b8d70 (patch) | |
tree | 941073a3588534db7b49e49d5ff210a62849020f /include | |
parent | 2c1d04e002dc91a6f34e8e683ea6b84f61a0b9fd (diff) |
blockdev: Keep track of monitor-owned BDS
As a side effect, we can now make x-blockdev-del's check whether a BDS
is actually owned by the monitor explicit.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 1e4c51875e..dd00d12a6f 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -445,6 +445,8 @@ struct BlockDriverState { QTAILQ_ENTRY(BlockDriverState) device_list; /* element of the list of all BlockDriverStates (all_bdrv_states) */ QTAILQ_ENTRY(BlockDriverState) bs_list; + /* element of the list of monitor-owned BDS */ + QTAILQ_ENTRY(BlockDriverState) monitor_list; QLIST_HEAD(, BdrvDirtyBitmap) dirty_bitmaps; int refcnt; @@ -707,4 +709,6 @@ bool bdrv_requests_pending(BlockDriverState *bs); void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out); void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in); +void blockdev_close_all_bdrv_states(void); + #endif /* BLOCK_INT_H */ |