History | View | Annotate | Download (2.9 kB)
snapshot: new function bdrv_snapshot_find_by_id_and_name()
To make it clear about id and name in searching, add this APIto distinguish them. Caller can choose to search by id or name,*errp will be set only for exception.
Some code are modified based on Pavel's patch....
snapshot: distinguish id and name in snapshot delete
Snapshot creation actually already distinguish id and name since it takea structured parameter *sn, but delete can't. Later an accurate deleteis needed in qmp_transaction abort and blockdev-snapshot-delete-sync,...
block: move snapshot code in block.c to block/snapshot.c
All snapshot related code, except bdrv_snapshot_dump() andbdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump()will be moved to another file later. bdrv_is_snapshot() is not related...