History | View | Annotate | Download (8.4 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,...
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open andBlockDriver.bdrv_file_open to allow more specific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
block: make bdrv_delete() static
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is nolonger public and should be called by bdrv_unref() if refcnt isdecreased to 0.
This is an identical change because effectively, there's no multiplereference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets...
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...