qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V5 5/6] block: Add backing file loop check in ch


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V5 5/6] block: Add backing file loop check in change_backing_file()
Date: Fri, 02 Aug 2013 16:31:25 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 08/02/2013 03:02 AM, Xu Wang wrote:
> From: Xu Wang <address@hidden>
> 
> Backing file loop should be checked before calling change_backing_
> file(). If loop appeared, this calling should be stopped and an

Breaking a function name across a line break is awkward.

> error was printed.

s/was //

> 
> Signed-off-by: Xu Wang <address@hidden>
> ---
>  block.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

>  
> +    /* Check if loop exists in backing files chain after changed */

s/changed/change/

But isn't that a bit late?  Don't you want to check that a backing loop
will not be created, prior to making the change?

> +    if (bdrv_backing_file_loop_check(bs->filename,
> +                                     bs->drv ? bs->drv->format_name : NULL,
> +                                     backing_file, backing_fmt)) {
> +        return -EIO;
> +    }
> +
>      if (drv->bdrv_change_backing_file != NULL) {
>          ret = drv->bdrv_change_backing_file(bs, backing_file, backing_fmt);
>      } else {
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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