Patchwork [4/7] Add blkdebug points for live block copy

login
register
mail settings
Submitter Marcelo Tosatti
Date June 6, 2011, 4:55 p.m.
Message ID <20110606165823.717709551@amt.cnet>
Download mbox | patch
Permalink /patch/99043/
State New
Headers show

Comments

Marcelo Tosatti - June 6, 2011, 4:55 p.m.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Patch

Index: qemu-block-copy/block.h
===================================================================
--- qemu-block-copy.orig/block.h
+++ qemu-block-copy/block.h
@@ -295,6 +295,14 @@  typedef enum {
     BLKDBG_CLUSTER_ALLOC_BYTES,
     BLKDBG_CLUSTER_FREE,
 
+    BLKDBG_BLKCOPY_STAGE_BULK,
+    BLKDBG_BLKCOPY_STAGE_BULK_FINISHED,
+    BLKDBG_BLKCOPY_STAGE_DIRTY,
+    BLKDBG_BLKCOPY_STAGE_MIRROR_WRITES,
+    BLKDBG_BLKCOPY_STAGE_SWITCH_FINISHED,
+    BLKDBG_BLKCOPY_SWITCH_START,
+    BLKDBG_BLKCOPY_AIO_WRITE,
+
     BLKDBG_EVENT_MAX,
 } BlkDebugEvent;
 
Index: qemu-block-copy/block/blkdebug.c
===================================================================
--- qemu-block-copy.orig/block/blkdebug.c
+++ qemu-block-copy/block/blkdebug.c
@@ -178,6 +178,15 @@  static const char *event_names[BLKDBG_EV
     [BLKDBG_CLUSTER_ALLOC]                  = "cluster_alloc",
     [BLKDBG_CLUSTER_ALLOC_BYTES]            = "cluster_alloc_bytes",
     [BLKDBG_CLUSTER_FREE]                   = "cluster_free",
+
+
+    [BLKDBG_BLKCOPY_STAGE_BULK]             = "blkcopy_stage_bulk",
+    [BLKDBG_BLKCOPY_STAGE_BULK_FINISHED]    = "blkcopy_stage_bulk_finished",
+    [BLKDBG_BLKCOPY_STAGE_DIRTY]            = "blkcopy_stage_dirty",
+    [BLKDBG_BLKCOPY_STAGE_MIRROR_WRITES]    = "blkcopy_stage_mirror_writes",
+    [BLKDBG_BLKCOPY_STAGE_SWITCH_FINISHED]  = "blkcopy_stage_switch_finished",
+    [BLKDBG_BLKCOPY_SWITCH_START]           = "blkcopy_switch_start",
+    [BLKDBG_BLKCOPY_AIO_WRITE]              = "blkcopy_aio_write",
 };
 
 static int get_event_by_name(const char *name, BlkDebugEvent *event)