[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Strange virtio regression on mainline and stable-0.10
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] Strange virtio regression on mainline and stable-0.10 |
Date: |
Tue, 05 May 2009 19:18:33 +0300 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
Avi Kivity wrote:
Running the Fedora 10 installer on a virtio disk on current master and
on v0.10.3 will cause the installer to complain when mounting the
freshly formatted filesystems.
The problem is that qcow2 does a read-modify-write on
non-cluster-aligned writes. So the following sequence triggers the bug:
guest: write(sector=0, count=1) (A)
guest: write(sector=1, count=1) (B)
qemu: read(sector=0, count=16) (A)
qemu: submit aio write (sector=0, count=16) (A)
qemu: read(sector=0, count=16) (B)
qemu: submit aio write (sector=0, count=16) (B) - contains data from
before A's write
This could be solved by maintaining a hash table of refcounted RMW
copies for the disk. When reading for a RMW, look up the hash table, if
there's a copy there, use it instead of reading it yourself.
We should also avoid the RMW for non-compressed, non-encrypted clusters,
as virtually ALL writes will be misaligned.
--
error compiling committee.c: too many arguments to function