From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] qcow2: Add two more unalignment checks
Date: Mon, 19 Jan 2015 16:09:17 -0500 [thread overview]
Message-ID: <54BD727D.5010608@redhat.com> (raw)
In-Reply-To: <54BD7173.7060901@redhat.com>
On 2015-01-19 at 16:04, Eric Blake wrote:
> On 01/19/2015 01:49 PM, Max Reitz wrote:
>> With the series adding unalignment checks and the series reworking the
>> zero cluster expansion code overlapping, the unalignment checks have not
>> been implemented in the latter code.
>>
>> This series fixes it.
>>
>> There are other places which would require unalignment checks, like the
>> offsets of L1 tables, especially for snapshots; but because it would be
>> best to add these checks in the function which reads the snapshot table,
>> this would make images with broken snapshots completely unusable, which
>> is something I opted to avoid for now.
>>
>> Ideally, we need to make the qcow2 repair function repair such cases,
>> but until that is done there is not much we can do about them.
> What's the best repair?
That's what I was asking myself...
> Read the data from the unaligned location, and
> write a fresh copy into a new aligned allocation?
Maybe. Maybe there is no way of repairing them and the only way is
asking the user whether it's fine to delete the snapshot (qemu-img check
-r make_consistent_whatever_it_takes).
Also, the question remains for every unaligned data structure: L2
tables, data clusters… The refcount structures are the only ones that
can be easily recovered. For data clusters, reading from the unaligned
location would probably be best; for L2 tables… maybe the same, then run
a consistency check on the data and if it seems off™, throw the whole L2
table away.
> At any rate, I agree
> that repairing unaligned locations is harder than detecting them, so
> your series is fine as is.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Thanks!
Max
next prev parent reply other threads:[~2015-01-19 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 20:49 [Qemu-devel] [PATCH 0/2] qcow2: Add two more unalignment checks Max Reitz
2015-01-19 20:49 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2015-01-19 20:49 ` [Qemu-devel] [PATCH 2/2] iotests: Add tests for more corruption cases Max Reitz
2015-01-19 21:04 ` [Qemu-devel] [PATCH 0/2] qcow2: Add two more unalignment checks Eric Blake
2015-01-19 21:09 ` Max Reitz [this message]
2015-01-20 10:09 ` Kevin Wolf
2015-01-20 13:49 ` Max Reitz
2015-01-20 14:00 ` Kevin Wolf
2015-01-20 14:01 ` Max Reitz
2015-01-22 18:04 ` 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=54BD727D.5010608@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).