qemu-e2k/include/block
Stefan Hajnoczi 29d782710f 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>
2013-06-04 13:56:29 +02:00
..
aio.h
block_int.h block: Remove filename parameter from .bdrv_file_open() 2013-04-22 11:34:35 +02:00
block.h block: drop bs_snapshots global variable 2013-06-04 13:56:29 +02:00
blockjob.h
coroutine_int.h coroutine: stop using AioContext in CoQueue 2013-05-24 16:17:56 +02:00
coroutine.h
nbd.h nbd: support large NBD requests 2013-05-03 13:05:49 +02:00
scsi.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
thread-pool.h