qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] qcow2/virtio corruption: Don't allocate the sam


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] qcow2/virtio corruption: Don't allocate the same cluster twice
Date: Wed, 06 May 2009 20:08:33 +0300
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Kevin Wolf wrote:
Avi Kivity schrieb:
What happens if the second request completes before the first? Then, when the first request completes, alloc_cluster_link_l2() will call copy_clusters() and overwrite the second request.

Ouch, you're right. I should not only check if the image is consistent,
but also if the data survives.


We really want qemu-io fsx.

Also, the second request now depends on the first to update its metadata. But if the first request fail, it will not update its metadata, and the second request will complete without error and also without updating its metadata.

Hm, right. Need to think about this...

I suggest retaining the part where you use inflight l2metas to layout data contiguously, but change alloc_cluster_link_l2() not to rely on n_start and nb_available but instead recompute them on completion. m->nb_clusters should never be zeroed for this to work.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

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