qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V3 4/7] blkdebug: add debug events for snapshot


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH V3 4/7] blkdebug: add debug events for snapshot
Date: Mon, 9 Sep 2013 10:57:59 +0800

Some code in qcow2-snapshot.c directly access bs->file, so in those
points error can't be injected by other events. Since the code in
qcow2-snapshot.c is qcow2's internal detail similar as L1 table,
so add some debug events.

Signed-off-by: Wenchao Xia <address@hidden>
---
 block/blkdebug.c      |    4 ++++
 include/block/block.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index 5d33e03..30eda44 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -186,6 +186,10 @@ static const char *event_names[BLKDBG_EVENT_MAX] = {
 
     [BLKDBG_FLUSH_TO_OS]                    = "flush_to_os",
     [BLKDBG_FLUSH_TO_DISK]                  = "flush_to_disk",
+
+    [BLKDBG_SNAPSHOT_L1_UPDATE]             = "snapshot_l1_update",
+    [BLKDBG_SNAPSHOT_LIST_UPDATE]           = "snapshot_list_update",
+    [BLKDBG_SNAPSHOT_HEADER_UPDATE]         = "snapshot_header_update",
 };
 
 static int get_event_by_name(const char *name, BlkDebugEvent *event)
diff --git a/include/block/block.h b/include/block/block.h
index e6b391c..e62098d 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -432,6 +432,10 @@ typedef enum {
     BLKDBG_FLUSH_TO_OS,
     BLKDBG_FLUSH_TO_DISK,
 
+    BLKDBG_SNAPSHOT_L1_UPDATE,
+    BLKDBG_SNAPSHOT_LIST_UPDATE,
+    BLKDBG_SNAPSHOT_HEADER_UPDATE,
+
     BLKDBG_EVENT_MAX,
 } BlkDebugEvent;
 
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]