From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkUeb-0005iv-Dg for qemu-devel@nongnu.org; Thu, 06 Jun 2013 03:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkUeV-00086V-5x for qemu-devel@nongnu.org; Thu, 06 Jun 2013 03:30:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkUeU-00086D-Sn for qemu-devel@nongnu.org; Thu, 06 Jun 2013 03:30:31 -0400 Date: Thu, 6 Jun 2013 09:30:10 +0200 From: Stefan Hajnoczi Message-ID: <20130606073010.GA13157@stefanha-thinkpad.redhat.com> References: <1369908025-9556-1-git-send-email-wdongxu@linux.vnet.ibm.com> <1369908025-9556-7-git-send-email-wdongxu@linux.vnet.ibm.com> <20130605134643.GG2611@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130605134643.GG2611@dhcp-200-207.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH V19 6/8] add debug event for add-cow List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: wdongxu@cn.ibm.com, Dongxu Wang , qemu-devel@nongnu.org On Wed, Jun 05, 2013 at 03:46:43PM +0200, Kevin Wolf wrote: > Am 30.05.2013 um 12:00 hat Dongxu Wang geschrieben: > > From: Dong Xu Wang > > > > Signed-off-by: Dong Xu Wang > > Signed-off-by: Dongxu Wang > > One of these should surely be enough? > > > --- > > block/blkdebug.c | 3 +++ > > block/block-cache.c | 4 ++-- > > include/block/block.h | 3 +++ > > 3 files changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/block/blkdebug.c b/block/blkdebug.c > > index 71f99e4..2bd6a53 100644 > > --- a/block/blkdebug.c > > +++ b/block/blkdebug.c > > @@ -182,6 +182,9 @@ static const char *event_names[BLKDBG_EVENT_MAX] = { > > [BLKDBG_CLUSTER_ALLOC] = "cluster_alloc", > > [BLKDBG_CLUSTER_ALLOC_BYTES] = "cluster_alloc_bytes", > > [BLKDBG_CLUSTER_FREE] = "cluster_free", > > + > > + [BLKDBG_ADDCOW_READ] = "add_cow_read", > > + [BLKDBG_ADDCOW_WRITE] = "add_cow_write", > > }; > > > > static int get_event_by_name(const char *name, BlkDebugEvent *event) > > 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); > > } > > Doesn't this break qcow2 test cases that don't get the > BLKDBG_COW_READ/WRITE events any more now? This event is only raised for BLKDBG_TABLE_BITMAP, which is new for add-cow only. qcow2 only uses L2 and refcount table types, not bitmap.