qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Cc: kwol@redhat.com, wdongxu@cn.ibm.com, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH V18 4/6] rename qcow2-cache.c to block-cache.c
Date: Thu, 18 Apr 2013 10:54:12 +0200	[thread overview]
Message-ID: <20130418085412.GB19587@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1365581513-3475-5-git-send-email-wdongxu@linux.vnet.ibm.com>

On Wed, Apr 10, 2013 at 04:11:51PM +0800, Dong Xu Wang wrote:

This patch does two things:
1. Rename and move qcow2-cache to block-cache.
2. Add a type enum to parameterize BLKDEBUG_EVENT() for L2, refcount,
   and bitmaps.

It's hard to review #2 since all lines are changed in the diff by #1.
In the future, please split patches that move code into two.

The first patch should simply move and rename - it should not include
code changes.

The second patch should contain code changes (i.e. adding the cache type
enum and parameterizing BLKDEBUG_EVENT()).

BTW, when splitting the patch into two for easy reviewing it also
becomes questionable whether to reassign authorship since 90+% of the
code is unchanged and simply moved.

> +    if (c->table_type == BLOCK_TABLE_REF) {
> +        BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_UPDATE_PART);
> +    } 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_COW_WRITE is for writing out sectors from the backing file.  It
is not for updating the allocation bitmap.

Please pick an appropriate constant or define your own if none exists.

> +    if (read_from_disk) {
> +        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);

Same here.

  reply	other threads:[~2013-04-18  8:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  8:11 [Qemu-devel] [PATCH V18 0/6] add-cow file format Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 1/6] docs: document for " Dong Xu Wang
2013-04-18  8:30   ` Stefan Hajnoczi
2013-04-23  1:45     ` Dong Xu Wang
2013-04-26 22:45   ` Eric Blake
2013-05-02  5:44     ` Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 2/6] make path_has_protocol non static Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 3/6] qed_read_string to bdrv_read_string Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 4/6] rename qcow2-cache.c to block-cache.c Dong Xu Wang
2013-04-18  8:54   ` Stefan Hajnoczi [this message]
2013-04-23  1:47     ` Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 5/6] add-cow file format core code Dong Xu Wang
2013-04-18 10:03   ` Stefan Hajnoczi
2013-04-23  1:54     ` Dong Xu Wang
2013-05-09  6:24     ` Dong Xu Wang
2013-05-09 15:07       ` Stefan Hajnoczi
2013-05-13 15:07   ` Jeff Cody
2013-05-14  2:15     ` Dong Xu Wang
2013-04-10  8:11 ` [Qemu-devel] [PATCH V18 6/6] qemu-iotests: add add-cow iotests support Dong Xu Wang
2013-04-18 10:06 ` [Qemu-devel] [PATCH V18 0/6] add-cow file format Stefan Hajnoczi

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=20130418085412.GB19587@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=kwol@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --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).