From 723ccda1a0eecece8e70dbcdd35a603f6c41a475 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Thu, 19 Nov 2015 09:42:06 +0300 Subject: 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 Reviewed-by: Fam Zheng Reviewed-by: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf Tested-by: Greg Kurz Signed-off-by: Juan Quintela --- include/block/snapshot.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/block/snapshot.h b/include/block/snapshot.h index 0a176c7..10ee582 100644 --- a/include/block/snapshot.h +++ b/include/block/snapshot.h @@ -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 -- cgit v1.1