[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 31/59] qapi/block: Add "fatal" to BLOCK_IMAGE_CORR
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v2 31/59] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED |
Date: |
Mon, 22 Sep 2014 12:42:02 +0100 |
From: Max Reitz <address@hidden>
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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,
&error_abort);
g_free(message);
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1692627..ef7faaa 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1570,7 +1570,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
#
@@ -1584,13 +1584,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
--
1.9.3
- [Qemu-devel] [PULL v2 22/59] win32-aio: Drop win32_aiocb_info.cancel, (continued)
- [Qemu-devel] [PULL v2 22/59] win32-aio: Drop win32_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 23/59] ide: Convert trim_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 18/59] quorum: fix quorum_aio_cancel(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 24/59] block: Drop AIOCBInfo.cancel, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 25/59] block: Rename qemu_aio_release -> qemu_aio_unref, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 27/59] aio-win32: avoid out-of-bounds access to the events array, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 28/59] block: Introduce "null" drivers, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 29/59] qapi: Sort BlockdevDriver enum data list, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 26/59] qdev-monitor: fix segmentation fault on qdev_device_help(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 30/59] qapi: Sort items in BlockdevOptions definition, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 31/59] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL v2 35/59] iotests: Add more tests for qcow2 corruption, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 36/59] image-fuzzer: Trivial readability and formatting improvements, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 38/59] qcow2: Fix leak of QemuOpts in qcow2_open(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 39/59] qapi: Allow enums in anonymous unions, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 40/59] qcow2: Add overlap-check.template option, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 41/59] qapi/block-core: Add "new" qcow2 options, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 43/59] fuzz: Add fuzzing functions for entries of refcount table and blocks, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 37/59] hmp: fix memory leak at hmp_info_block_jobs(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 44/59] layout: Add generators for refcount table and blocks, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 45/59] ahci: Adding basic functionality qtest., Stefan Hajnoczi, 2014/09/22