[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
- [Qemu-devel] [PATCH V3 0/7] qcow2: rollback the modification on fail in snapshot creation, Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 3/7] qcow2: cancel the modification on fail in qcow2_snapshot_create(), Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 2/7] qcow2: free allocated cluster on fail in qcow2_write_snapshots(), Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 6/7] qcow2: print message for error path in snapshot creation, Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 1/7] qcow2: restore nb_snapshots when fail in snapshot creation, Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 4/7] blkdebug: add debug events for snapshot,
Wenchao Xia <=
- [Qemu-devel] [PATCH V3 7/7] qemu-iotests: add test for qcow2 snapshot, Wenchao Xia, 2013/09/08
- [Qemu-devel] [PATCH V3 5/7] qcow2: use debug events for snapshot, Wenchao Xia, 2013/09/08
- Re: [Qemu-devel] [PATCH V3 0/7] qcow2: rollback the modification on fail in snapshot creation, Wenchao Xia, 2013/09/23