qemu/include
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
..
block block: drop bs_snapshots global variable 2013-06-04 13:56:29 +02:00
disas Add moxie disassembler 2013-03-23 14:25:41 +00:00
exec memory: add return value to address_space_rw/read/write 2013-05-29 16:27:34 +02:00
fpu softfloat: Implement uint64_to_float128 2013-01-05 10:12:50 +00:00
hw Merge remote-tracking branch 'kraxel/usb.83' into staging 2013-06-03 08:37:54 -05:00
migration savevm: Implement block_writev_buffer() 2013-04-15 08:26:18 +02:00
monitor add a new qevent: QEVENT_GUEST_PANICKED 2013-04-30 10:30:01 -05:00
net hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qapi qapi: pad GenericList value fields to 64 bits 2013-05-30 09:08:38 -04:00
qemu osdep: add qemu_get_local_state_pathname() 2013-05-30 11:37:37 -05:00
qom qom: aggressively optimize qom casting 2013-05-13 15:27:18 -05:00
sysemu Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging 2013-05-31 11:32:25 -05:00
ui console: zap ds arg from register_displaychangelistener 2013-04-25 14:45:46 -05:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
glib-compat.h glib: add a compatibility interface for g_timeout_add_seconds 2013-03-25 13:10:40 -05:00
libfdt_env.h fdt: Use bswapN instead of bswap_N 2013-01-12 12:22:58 +00:00
qemu-common.h ui/gtk.c: Fix *BSD build of Gtk+ UI 2013-05-22 07:40:09 -05:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00