qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block:Fix FIXED base vpc be probed to raw forma


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block:Fix FIXED base vpc be probed to raw format
Date: Wed, 11 Feb 2015 13:39:43 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Feb 10, 2015 at 11:04:31PM +0800, Xiaodong Gong wrote:
> On Mon, Feb 9, 2015 at 10:54 PM, Stefan Hajnoczi <address@hidden> wrote:
> 
> > On Sun, Feb 08, 2015 at 08:39:52PM +0800, Xiaodong Gong wrote:
> > > When open the vpc snapshot based FIXED format, its backing file,
> > > this FIXED vpc image, could be probed as a raw image, because that
> > > the find_image_format just checkout the first sector.
> > >
> > > Add a re-probe for the last sector to FIXED base vpc image,when get
> > > a NULL or raw driver in first sector probe.
> > >
> > > Signed-off-by: Xiaodong Gong <address@hidden>
> > > ---
> > >  block.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++-------
> > >  1 file changed, 48 insertions(+), 7 deletions(-)
> >
> > This approach is likely to cause issues because it makes no distiction
> > between headers and footers.  Most image formats only have a header and
> > would now be misdetected if a raw image had a header in its last sector.
> >
> > When a vpc image has a backing file, does it make sense to set the
> > bs->backing_format to "vpc"?  That way we'll try to open the backing
> > file as a vpc image without probing.
> >
> > Stefan
> >
> 
> 
> It works, but this probing of format sounds good . Giving a argument of bs
> to bdrv_probe and each of funtion of probe get it's own checking method is
> better, but the foot-print of patch is longer.

I'm not suggesting a longer patch.

Can the vpc .bdrv_open() code that loads the backing filename also set
bs->backing_format to "vpc" so QEMU will always use vpc for the backing
file?

Stefan

Attachment: pgp9qU01X6F7L.pgp
Description: PGP signature


reply via email to

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