qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 5/5] Add infinite loop check in drive_init()


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH V2 5/5] Add infinite loop check in drive_init()
Date: Wed, 10 Jul 2013 19:00:20 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, 07/08 03:26, Xu Wang wrote:
> Signed-off-by: Xu Wang <address@hidden>
> ---
>  blockdev.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/blockdev.c b/blockdev.c
> index 5975dde..0178764 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -695,6 +695,11 @@ DriveInfo *drive_init(QemuOpts *all_opts, 
> BlockInterfaceType block_default_type)
>          error_report("warning: disabling copy_on_read on readonly drive");
>      }
>  
> +    /* Add backing file loop check */
> +    if (bdrv_backing_file_loop_check(file, NULL, true, NULL, NULL)) {
You can pass drv->format_name as second parameter.
> +        goto err;
> +    }
> +
>      ret = bdrv_open(dinfo->bdrv, file, bs_opts, bdrv_flags, drv);
>      bs_opts = NULL;
>  
> -- 
> 1.8.1.4
> 
> 

-- 
Fam



reply via email to

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