[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V18 4/6] rename qcow2-cache.c to block-cache.c
From: |
Stefan Hajnoczi |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
- [Qemu-devel] [PATCH V18 0/6] add-cow file format, Dong Xu Wang, 2013/04/10
- [Qemu-devel] [PATCH V18 1/6] docs: document for add-cow file format, Dong Xu Wang, 2013/04/10
- [Qemu-devel] [PATCH V18 2/6] make path_has_protocol non static, Dong Xu Wang, 2013/04/10
- [Qemu-devel] [PATCH V18 3/6] qed_read_string to bdrv_read_string, Dong Xu Wang, 2013/04/10
- [Qemu-devel] [PATCH V18 4/6] rename qcow2-cache.c to block-cache.c, Dong Xu Wang, 2013/04/10
- Re: [Qemu-devel] [PATCH V18 4/6] rename qcow2-cache.c to block-cache.c,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH V18 5/6] add-cow file format core code., Dong Xu Wang, 2013/04/10
- [Qemu-devel] [PATCH V18 6/6] qemu-iotests: add add-cow iotests support, Dong Xu Wang, 2013/04/10
- Re: [Qemu-devel] [PATCH V18 0/6] add-cow file format, Stefan Hajnoczi, 2013/04/18