On Mon, 07/08 03:26, Xu Wang wrote:
> Signed-off-by: Xu Wang <cngesa...@gmail.com>
> ---
>  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