On Thu, May 30, 2013 at 06:00:23PM +0800, Dongxu Wang wrote: > diff --git a/block/block-cache.c b/block/block-cache.c > index f5d75d1..454269c 100644 > --- a/block/block-cache.c > +++ b/block/block-cache.c > @@ -125,7 +125,7 @@ static int block_cache_entry_flush(BlockDriverState *bs, > BlockCache *c, int i) > } else if (c->table_type == BLOCK_TABLE_L2) { > BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE); > } else if (c->table_type == BLOCK_TABLE_BITMAP) { > - BLKDBG_EVENT(bs->file, BLKDBG_COW_WRITE); > + BLKDBG_EVENT(bs->file, BLKDBG_ADDCOW_WRITE); > } > > ret = bdrv_pwrite(bs->file, c->entries[i].offset, > @@ -260,7 +260,7 @@ static int block_cache_do_get(BlockDriverState *bs, > BlockCache *c, > if (c->table_type == BLOCK_TABLE_L2) { > BLKDBG_EVENT(bs->file, BLKDBG_L2_LOAD); > } else if (c->table_type == BLOCK_TABLE_BITMAP) { > - BLKDBG_EVENT(bs->file, BLKDBG_COW_READ); > + BLKDBG_EVENT(bs->file, BLKDBG_ADDCOW_READ); > } > > ret = bdrv_pread(bs->file, offset, c->entries[i].table,
These patches are in the wrong order. The previous patch should not use the incorrect BLKDBG_COW_READ/BLKDBG_COW_WRITE values. Put the blkdebug.c and block.h changes from this patch before the previous patch so block-cache.c can use BLKDBG_ADDCOW_READ/BLKDBG_ADDCOW_WRITE from the start.