Re: [PATCH 1/1] vz: fix raise in vzDomainBlock

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

 




On 03.05.2017 13:44, Konstantin Neumoin wrote:
> Need begin job before lookup disk in config,
> because it can be edited at this moment.

I would slightly change commit message to something like:

Put domain access after acquiring job condition, otherwise
another job can change it meanwhile.

Otherwise ACK.

> 
> Signed-off-by: Konstantin Neumoin <kneumoin@xxxxxxxxxxxxx>
> ---
>  src/vz/vz_driver.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
> index 8f94326..954ca6a 100644
> --- a/src/vz/vz_driver.c
> +++ b/src/vz/vz_driver.c
> @@ -4000,12 +4000,6 @@ vzDomainBlockResize(virDomainPtr domain,
>          size /= 1024;
>      size /= 1024;
>  
> -    if (!(disk = virDomainDiskByName(dom->def, path, false))) {
> -        virReportError(VIR_ERR_INVALID_ARG,
> -                       _("invalid path: %s"), path);
> -        goto cleanup;
> -    }
> -
>      if (vzDomainObjBeginJob(dom) < 0)
>          goto cleanup;
>      job = true;
> @@ -4019,6 +4013,12 @@ vzDomainBlockResize(virDomainPtr domain,
>          goto cleanup;
>      }
>  
> +    if (!(disk = virDomainDiskByName(dom->def, path, false))) {
> +        virReportError(VIR_ERR_INVALID_ARG,
> +                       _("invalid path: %s"), path);
> +        goto cleanup;
> +    }
> +
>      ret = prlsdkResizeImage(dom, disk, size);
>  
>   cleanup:
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux