qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] qemu-io: Respect early image end for map


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH 2/3] qemu-io: Respect early image end for map
Date: Fri, 10 Oct 2014 14:03:47 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

> +        } else if (!num) {
> +            error_report("Unexpected end of image");
> +            return 0;

I think this test can miss some case of Unexpected end of image.

For example supose that in map_is_allocated the first bdrv_is_allocated
actually succeed then *pnum = num. Then the bottom loop has exit on failure
and the function return.

in map_f &num is map_is_allocated *pnum so map_f's num != 0 and this very test
fails to see the unexpected end of image error.

Best regards

Benoît

>          }
>  
>          retstr = ret ? "    allocated" : "not allocated";
> -- 
> 2.0.4
> 
> 



reply via email to

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