qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: wdongxu@cn.ibm.com, Dongxu Wang <wdongxu@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V19 6/8] add debug event for add-cow
Date: Thu, 6 Jun 2013 09:30:10 +0200	[thread overview]
Message-ID: <20130606073010.GA13157@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20130605134643.GG2611@dhcp-200-207.str.redhat.com>

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 <wdongxu@linux.vnet.ibm.com>
> > 
> > Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> > Signed-off-by: Dongxu Wang <wdongxu@linux.vnet.ibm.com>
> 
> 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.

  reply	other threads:[~2013-06-06  7:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 10:00 [Qemu-devel] [PATCH V19 0/8] add-cow file format Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 1/8] V18: docs: document for " Dongxu Wang
2013-06-03  1:48   ` Fam Zheng
2013-06-03  1:55     ` Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 2/8] make path_has_protocol non static Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 3/8] qed_read_string to bdrv_read_string Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 4/8] rename qcow2-cache.c to block-cache.c Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 5/8] Make block-cache.c be common interface Dongxu Wang
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 6/8] add debug event for add-cow Dongxu Wang
2013-06-05 13:35   ` Stefan Hajnoczi
2013-06-05 13:46   ` Kevin Wolf
2013-06-06  7:30     ` Stefan Hajnoczi [this message]
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 7/8] add-cow file format core code Dongxu Wang
2013-06-05 14:21   ` Stefan Hajnoczi
2013-05-30 10:00 ` [Qemu-devel] [PATCH V19 8/8] qemu-iotests: add add-cow iotests support Dongxu Wang
2013-06-03  1:47 ` [Qemu-devel] [PATCH V19 0/8] add-cow file format Fam Zheng
2013-07-22  5:10 ` Wenchao Xia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130606073010.GA13157@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wdongxu@cn.ibm.com \
    --cc=wdongxu@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).