[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 13/17] qcow2/overlaps: Add "memory limit reached"
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v4 13/17] qcow2/overlaps: Add "memory limit reached" event |
Date: |
Mon, 4 May 2015 21:15:49 +0200 |
Later, a mechanism to set a limit on how much memory may be used for the
overlap prevention structures will be introduced. If that limit is about
to be exceeded, a QMP event should be emitted. This very event is
specified by this patch.
Signed-off-by: Max Reitz <address@hidden>
---
docs/qmp/qmp-events.txt | 28 ++++++++++++++++++++++++++++
qapi/event.json | 27 +++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt
index b19e490..4ec257e 100644
--- a/docs/qmp/qmp-events.txt
+++ b/docs/qmp/qmp-events.txt
@@ -261,6 +261,34 @@ Example:
{ "event": "POWERDOWN",
"timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
+QCOW2_OVERLAP_CHECK_MEMORY_LIMIT_REACHED
+----------------------------------------
+
+Emitted by the qcow2 block driver if the preset size limit for the in-memory
+structures for metadata overlap prevention has been reached and an allocation
+of further resources has been denied. This means that it cannot be guaranteed
+that overlap checks will be performed for the specified range; if no range is
+given, no checks can be expected to be performed whatsoever.
+
+Note that this event does not guarantee that no check will be performed in the
+given range (or on the whole image, if no range is given), but only signals the
+possibility that this might be the case. The ability to check the full range or
+a part of it may be restored at any point in time.
+
+Data:
+- "reference": Device name if set; node name otherwise. (json-string)
+- "start": Offset of the range of clusters (possibly) no longer being
+ checked for writes overlapping with existing metadata.
+ (json-int, optional)
+- "length": Length of that range in bytes. (json-int, optional)
+
+Example:
+
+{ "event": "QCOW2_OVERLAP_CHECK_MEMORY_LIMIT_REACHED",
+ "data": { "reference": "virtio0", "start": "805306368",
+ "length": "268435456" },
+ "timestamp": { "seconds": 1429331400, "microseconds": 519454 } }
+
QUORUM_FAILURE
--------------
diff --git a/qapi/event.json b/qapi/event.json
index c51dc49..a6cd053 100644
--- a/qapi/event.json
+++ b/qapi/event.json
@@ -330,3 +330,30 @@
##
{ 'event': 'VSERPORT_CHANGE',
'data': { 'id': 'str', 'open': 'bool' } }
+
+##
+# @QCOW2_OVERLAP_CHECK_MEMORY_LIMIT_REACHED
+#
+# Emitted by the qcow2 block driver if the preset size limit for the in-memory
+# structures for metadata overlap prevention has been reached and an allocation
+# of further resources has been denied. This means that no overlap checks will
+# be performed for the specified range.
+#
+# Note that this event does not guarantee that no check will be performed in
the
+# given range (or on the whole image, if no range is given), but only signals
+# the possibility that this might be the case. The ability to check the full
+# range or a part of it may be restored at any point in time.
+#
+# @reference: device name if set; node name otherwise
+#
+# @start: #optional offset of the range of clusters (possibly) no longer
+# being checked for writes overlapping with existing metadata
+#
+# @length: #optional length of that range in bytes
+#
+# Since: 2.4
+##
+{ 'event': 'QCOW2_OVERLAP_CHECK_MEMORY_LIMIT_REACHED',
+ 'data': { 'reference': 'str',
+ '*start': 'int',
+ '*length': 'int' } }
--
2.3.7
- [Qemu-devel] [PATCH v4 03/17] qcow2: Create metadata list, (continued)
- [Qemu-devel] [PATCH v4 03/17] qcow2: Create metadata list, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 04/17] qcow2/overlaps: Protect image header, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 05/17] qcow2/overlaps: Protect refcount table, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 06/17] qcow2/overlaps: Protect refcount blocks, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 07/17] qcow2/overlaps: Protect active L1 table, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 08/17] qcow2/overlaps: Protect active L2 tables, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 09/17] qcow2/overlaps: Protect snapshot table, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 10/17] qcow2/overlaps: Protect inactive L1 tables, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 11/17] qcow2/overlaps: Protect inactive L2 tables, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 12/17] qcow2: Use new metadata overlap check function, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 13/17] qcow2/overlaps: Add "memory limit reached" event,
Max Reitz <=
- [Qemu-devel] [PATCH v4 15/17] qcow2: Add overlap structure memory size options, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 14/17] qcow2/overlaps: Add memory usage limit, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 16/17] qapi: Expose new qcow2 overlap check options, Max Reitz, 2015/05/04
- [Qemu-devel] [PATCH v4 17/17] iotests: Test qcow2's overlap check memory limit, Max Reitz, 2015/05/04