mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
snapshot: create bdrv_all_find_snapshot helper
to check that snapshot is available for all loaded block drivers. The check bs != bs1 in hmp_info_snapshots is an optimization. The check for availability of this snapshot will return always true as the list of snapshots was collected from that image. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
849f96e2f7
commit
723ccda1a0
3 changed files with 30 additions and 33 deletions
|
@ -85,5 +85,6 @@ bool bdrv_all_can_snapshot(BlockDriverState **first_bad_bs);
|
|||
int bdrv_all_delete_snapshot(const char *name, BlockDriverState **first_bsd_bs,
|
||||
Error **err);
|
||||
int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bsd_bs);
|
||||
int bdrv_all_find_snapshot(const char *name, BlockDriverState **first_bad_bs);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue