qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/7] qemuSnapshotDiskPrepareOne: Get available even if sna


From: Peter Krempa
Subject: Re: [PATCH v2 1/7] qemuSnapshotDiskPrepareOne: Get available even if snapdisk is NULL
Date: Tue, 8 Sep 2020 15:13:29 +0200
User-agent: Mutt/1.14.6 (2020-07-11)

On Fri, Aug 28, 2020 at 10:08:30 -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> 
> Get available even if snapdisk argument is NULL at 
> qemuSnapshotDiskPrepareOne()
> so that the caller can setup dd->src.
> 
> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> ---
>  src/qemu/qemu_snapshot.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
> index 1e8ea80b22..d310e6ff02 100644
> --- a/src/qemu/qemu_snapshot.c
> +++ b/src/qemu/qemu_snapshot.c
> @@ -953,8 +953,9 @@ qemuSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
>      if (qemuDomainStorageSourceValidateDepth(disk->src, 1, disk->dst) < 0)
>          return -1;
>  
> -    if (!(dd->src = virStorageSourceCopy(snapdisk->src, false)))
> -        return -1;
> +    if (snapdisk)
> +        if (!(dd->src = virStorageSourceCopy(snapdisk->src, false)))
> +            return -1;

NACK, you can pass in a 'snapdisk' with the correct data to create the
overlay which will be a cleaner solution.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]