public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption
       [not found] <tip-4839bcd6b04a1b628f0f00d535ddca2ee872e9fa@git.kernel.org>
@ 2011-07-21  8:09 ` Kevin Wolf
  2011-07-22  8:21   ` Pekka Enberg
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2011-07-21  8:09 UTC (permalink / raw)
  To: linux-kernel, mingo, hpa, levinsasha928, penberg, kwolf, tglx
  Cc: linux-tip-commits, kvm-devel

Am 20.07.2011 21:49, schrieb tip-bot for Pekka Enberg:
> Commit-ID:  4839bcd6b04a1b628f0f00d535ddca2ee872e9fa
> Gitweb:     http://git.kernel.org/tip/4839bcd6b04a1b628f0f00d535ddca2ee872e9fa
> Author:     Pekka Enberg <penberg@kernel.org>
> AuthorDate: Wed, 20 Jul 2011 16:28:31 +0300
> Committer:  Pekka Enberg <penberg@kernel.org>
> CommitDate: Wed, 20 Jul 2011 16:28:31 +0300
> 
> kvm tools, qcow: Fix copy-on-write image corruption
> 
> We don't handle refcount table properly so make sure we only write to clusters
> that have the "copied" flag set.
> 
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>

Hm, I must have missed this patch on the KVM mailing list...

You should also error out before creating a new L2 table as its refcount
would have to be updated, too. On the other hand, the patch is a bit too
restrictive, because it applies the check to qcow1 which doesn't even
have a refcount table.

I'm not sure if everyone is aware of it, so another hint: Now that you
can't grow qcow2 any more, you might find it useful to use qemu-img
create -f qcow2 -o preallocation=metadata, so that all clusters are
already present and you don't get random failures.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption
  2011-07-21  8:09 ` [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption Kevin Wolf
@ 2011-07-22  8:21   ` Pekka Enberg
  2011-07-22  8:33     ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Pekka Enberg @ 2011-07-22  8:21 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: linux-kernel, mingo, hpa, levinsasha928, tglx, linux-tip-commits,
	kvm-devel

On Thu, 21 Jul 2011, Kevin Wolf wrote:
> Hm, I must have missed this patch on the KVM mailing list...

It wasn't on the list, sorry.

> You should also error out before creating a new L2 table as its refcount
> would have to be updated, too. On the other hand, the patch is a bit too
> restrictive, because it applies the check to qcow1 which doesn't even
> have a refcount table.

Oh, right, I broken QCOW1.

> I'm not sure if everyone is aware of it, so another hint: Now that you
> can't grow qcow2 any more, you might find it useful to use qemu-img
> create -f qcow2 -o preallocation=metadata, so that all clusters are
> already present and you don't get random failures.

Yup, I'm aware that you can't grow images anymore. The patch was meant as 
a stop-gap measure while I'm hacking on refcount table support.

 			Pekka

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption
  2011-07-22  8:21   ` Pekka Enberg
@ 2011-07-22  8:33     ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2011-07-22  8:33 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: linux-kernel, mingo, hpa, levinsasha928, tglx, linux-tip-commits,
	kvm-devel

Am 22.07.2011 10:21, schrieb Pekka Enberg:
> On Thu, 21 Jul 2011, Kevin Wolf wrote:
>> Hm, I must have missed this patch on the KVM mailing list...
> 
> It wasn't on the list, sorry.
> 
>> You should also error out before creating a new L2 table as its refcount
>> would have to be updated, too. On the other hand, the patch is a bit too
>> restrictive, because it applies the check to qcow1 which doesn't even
>> have a refcount table.
> 
> Oh, right, I broken QCOW1.
> 
>> I'm not sure if everyone is aware of it, so another hint: Now that you
>> can't grow qcow2 any more, you might find it useful to use qemu-img
>> create -f qcow2 -o preallocation=metadata, so that all clusters are
>> already present and you don't get random failures.
> 
> Yup, I'm aware that you can't grow images anymore. The patch was meant as 
> a stop-gap measure while I'm hacking on refcount table support.

Yeah, I was pretty sure you were aware of _that_, but maybe not everyone
knows that metadata preallocation exists.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-22  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <tip-4839bcd6b04a1b628f0f00d535ddca2ee872e9fa@git.kernel.org>
2011-07-21  8:09 ` [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption Kevin Wolf
2011-07-22  8:21   ` Pekka Enberg
2011-07-22  8:33     ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox