All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: "Benoît Canet" <benoit.canet@irqsave.net>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/5] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED
Date: Mon, 08 Sep 2014 19:40:12 +0200	[thread overview]
Message-ID: <540DE9FC.6010703@redhat.com> (raw)
In-Reply-To: <20140908140118.GC22582@irqsave.net>

On 08.09.2014 16:01, Benoît Canet wrote:
> The Friday 05 Sep 2014 à 16:07:15 (+0200), Max Reitz wrote :
>> Not every BLOCK_IMAGE_CORRUPTED event must be fatal; for example, when
>> reading from an image, they should generally not be. Nonetheless, even
>> an image only read from may of course be corrupted and this can be
>> detected during normal operation. In this case, a non-fatal event should
>> be emitted, but the image should not be marked corrupt (in accordance to
>> "fatal" set to false).
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   block/qcow2-refcount.c | 1 +
>>   qapi/block-core.json   | 9 +++++++--
>>   2 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
>> index 43665b8..0bd75d2 100644
>> --- a/block/qcow2-refcount.c
>> +++ b/block/qcow2-refcount.c
>> @@ -1853,6 +1853,7 @@ int qcow2_pre_write_overlap_check(BlockDriverState *bs, int ign, int64_t offset,
>>                                                 offset,
>>                                                 true,
>>                                                 size,
>> +                                              true,
> What is this line ?

It's the new "fatal" field in BLOCK_IMAGE_CORRUPTED (missing context: 
qapi_event_send_block_image_corrupted(bdrv_get_device_name(bs), message, 
true, offset, true, size, +true, &error_abort)).

Max

>>                                                 &error_abort);
>>           g_free(message);
>>   
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index a685d02..d23bcc2 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -1554,7 +1554,7 @@
>>   ##
>>   # @BLOCK_IMAGE_CORRUPTED
>>   #
>> -# Emitted when a disk image is being marked corrupt
>> +# Emitted when a corruption has been detected in a disk image
>>   #
>>   # @device: device name
>>   #
>> @@ -1568,13 +1568,18 @@
>>   # @size: #optional, if the corruption resulted from an image access, this is
>>   #        the access size
>>   #
>> +# fatal: if set, the image is marked corrupt and therefore unusable after this
>> +#        event and must be repaired (Since 2.2; before, every
>> +#        BLOCK_IMAGE_CORRUPTED event was fatal)
>> +#
>>   # Since: 1.7
>>   ##
>>   { 'event': 'BLOCK_IMAGE_CORRUPTED',
>>     'data': { 'device' : 'str',
>>               'msg'    : 'str',
>>               '*offset': 'int',
>> -            '*size'  : 'int' } }
>> +            '*size'  : 'int',
>> +            'fatal'  : 'bool' } }
>>   
>>   ##
>>   # @BLOCK_IO_ERROR
>> -- 
>> 2.1.0
>>
>>

  reply	other threads:[~2014-09-08 17:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 14:07 [Qemu-devel] [PATCH v2 0/5] qcow2: Check L1/L2/reftable entries for alignment Max Reitz
2014-09-05 14:07 ` [Qemu-devel] [PATCH v2 1/5] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED Max Reitz
2014-09-05 14:29   ` Eric Blake
2014-09-05 14:40   ` Eric Blake
2014-09-05 14:47     ` Max Reitz
2014-09-05 14:51       ` Eric Blake
2014-09-05 14:53         ` Max Reitz
2014-09-08 14:01   ` Benoît Canet
2014-09-08 17:40     ` Max Reitz [this message]
2014-09-05 14:07 ` [Qemu-devel] [PATCH v2 2/5] qcow2: Add qcow2_signal_corruption() Max Reitz
2014-09-05 14:43   ` Eric Blake
2014-09-08 14:15   ` Benoît Canet
2014-09-05 14:07 ` [Qemu-devel] [PATCH v2 3/5] qcow2: Use qcow2_signal_corruption() for overlaps Max Reitz
2014-09-05 14:52   ` Eric Blake
2014-09-08 14:21   ` Benoît Canet
2014-09-05 14:07 ` [Qemu-devel] [PATCH v2 4/5] qcow2: Check L1/L2/reftable entries for alignment Max Reitz
2014-09-05 15:03   ` Eric Blake
2014-09-08 14:40   ` Benoît Canet
2014-09-08 17:47     ` Max Reitz
2014-09-08 18:03       ` Benoît Canet
2014-09-05 14:07 ` [Qemu-devel] [PATCH v2 5/5] iotests: Add more tests for qcow2 corruption Max Reitz
2014-09-05 15:09   ` Eric Blake
2014-09-16 13:48 ` [Qemu-devel] [PATCH v2 0/5] qcow2: Check L1/L2/reftable entries for alignment Stefan Hajnoczi

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=540DE9FC.6010703@redhat.com \
    --to=mreitz@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --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 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.