qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V17 5/6] add-cow file format core code.


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH V17 5/6] add-cow file format core code.
Date: Tue, 11 Dec 2012 10:03:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]