mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
block: Add BlockBackendRootState
This structure will store some of the state of the root BDS if the BDS tree is removed, so that state can be restored once a new BDS tree is inserted. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
973f2ddf7b
commit
281d22d86c
4 changed files with 53 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "block/accounting.h"
|
||||
#include "block/block.h"
|
||||
#include "block/throttle-groups.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/queue.h"
|
||||
#include "qemu/coroutine.h"
|
||||
|
@ -449,6 +450,15 @@ struct BlockDriverState {
|
|||
NotifierWithReturn write_threshold_notifier;
|
||||
};
|
||||
|
||||
struct BlockBackendRootState {
|
||||
int open_flags;
|
||||
bool read_only;
|
||||
BlockdevDetectZeroesOptions detect_zeroes;
|
||||
|
||||
char *throttle_group;
|
||||
ThrottleState *throttle_state;
|
||||
};
|
||||
|
||||
static inline BlockDriverState *backing_bs(BlockDriverState *bs)
|
||||
{
|
||||
return bs->backing ? bs->backing->bs : NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue