|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [RFC][STABLE 0.13] Revert "qcow2: Use bdrv_(p)write_sync for metadata writes" |
Date: | Tue, 24 Aug 2010 08:40:38 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6 |
On 08/24/2010 08:39 AM, Avi Kivity wrote:
On 08/24/2010 04:35 PM, Anthony Liguori wrote:It's about metadata writes. If an operation changes metadata, we must sync it to disk before writing any data or other metadata which depends on it, regardless of any promises to the guest.Why? If the metadata isn't sync, we loose the write. But that can happen anyway because we're not sync'ing the dataWe need to sync the metadata in the event of a guest initiated flush, but we shouldn't need to for a normal write.1. Allocate a cluster (increase refcount table) 2. Link cluster to L2 table 3. Second operation makes it to disk; first still in pagecache 4. Crash 5. Dangling pointer from L2 to freed cluster
Yes, having this discussion in IRC.The problem is that we maintain a refcount table. If we didn't do internal disk snapshots, we wouldn't have this problem. IOW, VMDK doesn't have this problem so the answer to my very first question is that qcow2 is too difficult a format to get right.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |