diff mbox

[V3,4/7] blkdebug: add debug events for snapshot

Message ID 1378695482-29805-5-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Sept. 9, 2013, 2:57 a.m. UTC
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 <xiawenc@linux.vnet.ibm.com>
---
 block/blkdebug.c      |    4 ++++
 include/block/block.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

Comments

Eric Blake Sept. 30, 2013, 9:26 p.m. UTC | #1
On 09/08/2013 08:57 PM, Wenchao Xia wrote:
> 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 <xiawenc@linux.vnet.ibm.com>
> ---
>  block/blkdebug.c      |    4 ++++
>  include/block/block.h |    4 ++++
>  2 files changed, 8 insertions(+), 0 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

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;