All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
	levinsasha928@gmail.com, penberg@kernel.org, kwolf@redhat.com,
	tglx@linutronix.de
Cc: linux-tip-commits@vger.kernel.org, kvm-devel <kvm@vger.kernel.org>
Subject: Re: [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption
Date: Thu, 21 Jul 2011 10:09:13 +0200	[thread overview]
Message-ID: <4E27DEA9.20404@redhat.com> (raw)
In-Reply-To: <tip-4839bcd6b04a1b628f0f00d535ddca2ee872e9fa@git.kernel.org>

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

       reply	other threads:[~2011-07-21  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-4839bcd6b04a1b628f0f00d535ddca2ee872e9fa@git.kernel.org>
2011-07-21  8:09 ` Kevin Wolf [this message]
2011-07-22  8:21   ` [tip:tools/kvm] kvm tools, qcow: Fix copy-on-write image corruption Pekka Enberg
2011-07-22  8:33     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E27DEA9.20404@redhat.com \
    --to=kwolf@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=penberg@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.