Port-xen archive

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

Re: HVM disc corruption (was Re: Xen won't start its device backend?)



On Wed, May 27, 2015 at 09:39:19PM +0100, Roger Pau Monn? wrote:
> El 27/05/15 a les 21.29, Reinoud Zandijk ha escrit:
> > It then reads the disklabel fine. Inspecting the code it seems to open the
> > disc with O_BINARY, with a possible O_DIRECT / O_DSYNC. Reading it seems to do
> > on a 512 block boundary for files opened with O_DIRECT and it uses lseek() in
> > combination with the qemu_read(fd, buf, cnt) function.
> > 
> > Is there any special behaviour on raw devices for such flags / functions that
> > could trigger the bug?
> 
> FWIW I had to craft the following patch for FreeBSD:
> 
> http://git.qemu.org/?p=qemu.git;a=patch;h=3cad83075c7b847fe0eb6e61316fdf50984d4570
> 
> Note that this is for Qemu upstream, not the qemu-xen fork that's used
> by NetBSD, but I guess the issue could also be there.

Thanks for the patch. I haven't applied it yet but i did a search for the
lseek()s in the ktrace i made of the qemu-dm and i havent't found a seek yet
that is not a multiple of 0x200 so apparently it does do the sector size
alignment.

Do you think it might be usefull to just try out a NetBSD variant of the
patch?

With regards,
Reinoud



Home | Main Index | Thread Index | Old Index