qemu-devel
[Top][All Lists]
Advanced

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

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


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

Kevin Wolf wrote:
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.

Is there even a reason why we need to copy the unmodified sectors in
alloc_cluster_link_l2() and cannot do that in alloc_cluster_offset()
before we write the new data? Then the callback wouldn't need to mess
around with figuring out which part must be overwritten and which one
mustn't.

Then you have the inverse problem, you need to only copy sectors which aren't under an inflight write, and if such an inflight write fails, you do need to copy them.

--
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]