diff options
| author | Stefan Hajnoczi | 2013-05-25 05:09:42 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2013-06-04 13:56:29 +0200 |
| commit | 29d782710f87f01991bfc85cd9bef7d15280a5e2 (patch) | |
| tree | 87fce82d0ff664d7f06e23e3f66a9276c5fc58dd /block/Makefile.objs | |
| parent | qemu-iotests: make create_image() common (diff) | |
| download | qemu-29d782710f87f01991bfc85cd9bef7d15280a5e2.tar.gz qemu-29d782710f87f01991bfc85cd9bef7d15280a5e2.tar.xz qemu-29d782710f87f01991bfc85cd9bef7d15280a5e2.zip | |
block: drop bs_snapshots global variable
The bs_snapshots global variable points to the BlockDriverState which
will be used to save vmstate. This is really a savevm.c concept but was
moved into block.c:bdrv_snapshots() when it became clear that hotplug
could result in a dangling pointer.
While auditing the block layer's global state I came upon bs_snapshots
and realized that a variable is not necessary here. Simply find the
first BlockDriverState capable of internal snapshots each time this is
needed.
The behavior of bdrv_snapshots() is preserved across hotplug because new
drives are always appended to the bdrv_states list. This means that
calling the new find_vmstate_bs() function is idempotent - it returns
the same BlockDriverState unless it was hot-unplugged.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/Makefile.objs')
0 files changed, 0 insertions, 0 deletions
