qemu: block: use the delete flag to delete snapshot images if requested
When blockcommit finishes successfully, one of the qemuBlockJobProcessEventCompletedCommit() and qemuBlockJobProcessEventCompletedActiveCommit() event handlers is called. This is where the delete flag (stored in qemuBlockJobCommitData since the previous commit) can actually be used to delete the committed snapshot images if requested. We use virFileRemove() instead of a simple unlink() to cover the case where the image to be removed is on an NFS volume. Signed-off-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
Showing
想要评论请 注册 或 登录