Received: from eggs.gnu.org ([2001:4830:134:3::10]:53990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDru-0002ul-R0 for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkDrq-00079p-7M for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:35:14 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:54050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDrq-00079X-1J for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:35:10 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so1355404wgg.16 for ; Wed, 05 Jun 2013 06:35:09 -0700 (PDT) Date: Wed, 5 Jun 2013 15:35:05 +0200 From: Stefan Hajnoczi Message-ID: <20130605133505.GG31478@stefanha-thinkpad.muc.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369908025-9556-7-git-send-email-wdongxu@linux.vnet.ibm.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: Dongxu Wang Cc: kwolf@redhat.com, wdongxu@cn.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com 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.