[libvirt] [PATCH v4 2/4] qemu: block: use the delete flag to delete snapshot images if requested
Peter Krempa
pkrempa at redhat.com
Wed Dec 11 07:38:36 UTC 2019
On Tue, Dec 10, 2019 at 17:25:39 +0100, Pavel Mores wrote:
> 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: Pavel Mores <pmores at redhat.com>
> ---
> src/qemu/qemu_blockjob.c | 46 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list