From: Max Reitz <mreitz@redhat.com>
To: John Snow <jsnow@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-stable@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qcow2: Do not mark inactive images corrupt
Date: Wed, 6 Jun 2018 21:32:51 +0200 [thread overview]
Message-ID: <deddda05-d458-b5c1-643d-da188ce2d9b0@redhat.com> (raw)
In-Reply-To: <b962bc23-039a-7653-e180-749e3085121c@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
On 2018-06-04 20:58, John Snow wrote:
>
>
> On 06/04/2018 10:14 AM, Max Reitz wrote:
>> The non-public logs in
>> https://bugzilla.redhat.com/show_bug.cgi?id=1583346 (sorry...) reveal
>> this problem:
>>
>> $ (Create a qcow2 file "foo.qcow2" with a corrupted first L1 entry)
>> $ echo 'qemu-io none0 "read 0 512"' \
>> | x86_64-softmmu/qemu-system-x86_64 -drive if=none,file=foo.qcow2 \
>> -monitor stdio \
>> -incoming exec:'cat /dev/null'
>> QEMU 2.12.50 monitor - type 'help' for more information
>> (qemu) qemu-io none0 "read 0 512"
>> qcow2: Marking image as corrupt: L2 table offset 0x44200 unaligned (L1 index: 0); further corruption events will be suppressed
>> qemu-system-x86_64: block/io.c:1691: bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed.
>> [1] 18444 done echo 'qemu-io none0 "read 0 512"' |
>> 18445 abort (core dumped) x86_64-softmmu/qemu-system-x86_64 -drive if=none,file=foo.qcow2 -monitor stdi
>>
>> Oops.
>>
>>
>> The first patch in this series fixes this by treating inactive images
>> like read-only images in this regard (which most importantly means not
>> trying to set the corrupt flag on them), the second one adds an iotest
>> case.
>>
>>
>> Max Reitz (2):
>> qcow2: Do not mark inactive images corrupt
>> iotests: Add case for a corrupted inactive image
>>
>> block/qcow2.c | 4 +++-
>> tests/qemu-iotests/060 | 30 ++++++++++++++++++++++++++++++
>> tests/qemu-iotests/060.out | 14 ++++++++++++++
>> 3 files changed, 47 insertions(+), 1 deletion(-)
>>
>
> Makes sense to me, provided it's safe to check via BDRV_O_RDWR instead
> of bs->read_only. (I assume it is.)
It's all a mess is all I can say.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2018-06-06 19:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 14:14 [Qemu-devel] [PATCH 0/2] qcow2: Do not mark inactive images corrupt Max Reitz
2018-06-04 14:14 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2018-06-04 20:06 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2018-06-06 10:22 ` Max Reitz
2018-06-04 14:14 ` [Qemu-devel] [PATCH 2/2] iotests: Add case for a corrupted inactive image Max Reitz
2018-06-04 20:10 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2018-06-04 18:58 ` [Qemu-devel] [Qemu-block] [PATCH 0/2] qcow2: Do not mark inactive images corrupt John Snow
2018-06-06 19:32 ` Max Reitz [this message]
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=deddda05-d458-b5c1-643d-da188ce2d9b0@redhat.com \
--to=mreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).