From: Kevin Wolf <kwolf@redhat.com>
To: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH V17 5/6] add-cow file format core code.
Date: Tue, 11 Dec 2012 10:03:53 +0100 [thread overview]
Message-ID: <50C6F6F9.5060302@redhat.com> (raw)
In-Reply-To: <CAGrFBsjFeznkZSMcDzry-7xB+WYH=wtn_SPMWMCi9OhTYJnbQg@mail.gmail.com>
Am 11.12.2012 09:11, schrieb Dong Xu Wang:
>>> index bf5c57c..1a30462 100644
>>> --- a/block/block-cache.c
>>> +++ b/block/block-cache.c
>>> @@ -112,6 +112,8 @@ static int block_cache_entry_flush(BlockDriverState *bs, BlockCache *c, int i)
>>> 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);
>>> }
>>>
>>> ret = bdrv_pwrite(bs->file, c->entries[i].offset,
>>> @@ -245,6 +247,8 @@ static int block_cache_do_get(BlockDriverState *bs, BlockCache *c,
>>> 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);
>>> }
>>
>> I must admit that I don't like this table_type stuff at all, even more
>> so if every new format adds new types to it. Not sure what to suggest here.
>>
>> But anyway, even if we leave it, aren't BLKDBG_COW_READ/WRITE something
>> completely different?
>
> Sorry, I have read enum BlkDebugEvent to find out which type would be
> suitable for this case. In the previous
> comments, you said existing DebugEvent types would be enough, do you
> think which types should be picked up
> for add-cow BLKDBG_EVENT?
Maybe BLKDBG_L2_LOAD/UPDATE?
Kevin
next prev parent reply other threads:[~2012-12-11 9:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 6:51 [Qemu-devel] [PATCH V17 0/6] add-cow file format Dong Xu Wang
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 1/6] docs: document for " Dong Xu Wang
2012-12-10 15:39 ` Kevin Wolf
2012-12-11 8:02 ` Dong Xu Wang
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 2/6] make path_has_protocol non static Dong Xu Wang
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 3/6] qed_read_string to bdrv_read_string Dong Xu Wang
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 4/6] rename qcow2-cache.c to block-cache.c Dong Xu Wang
2012-12-10 17:11 ` Kevin Wolf
2012-12-11 8:25 ` Dong Xu Wang
2012-12-11 8:59 ` Kevin Wolf
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 5/6] add-cow file format core code Dong Xu Wang
2012-12-10 17:54 ` Kevin Wolf
2012-12-11 8:11 ` Dong Xu Wang
2012-12-11 9:03 ` Kevin Wolf [this message]
2012-12-06 6:51 ` [Qemu-devel] [PATCH V17 6/6] qemu-iotests: add add-cow iotests support Dong Xu Wang
2012-12-10 17:15 ` Kevin Wolf
2012-12-11 8:02 ` Dong Xu Wang
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=50C6F6F9.5060302@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).