于 2013-1-8 18:37, Kevin Wolf 写道:
> Am 08.01.2013 03:25, schrieb Wenchao Xia:
>> 于 2013-1-8 0:43, Kevin Wolf 写道:
>>> Am 17.12.2012 07:25, schrieb Wenchao Xia:
>>>>     This patch moves bdrv_snapshotfind from savevm.c to block.c and export
>>>> it, also added bdrv_deappend in block.c.
>>>>
>>>> Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com>
>>>
>>> Should be two separate patches.
>>>
>>     OK, it have been split into two patches in V2.
>>
>>>> ---
>>>>    block.c  |   30 ++++++++++++++++++++++++++++++
>>>>    block.h  |    3 +++
>>>>    savevm.c |   22 ----------------------
>>>>    3 files changed, 33 insertions(+), 22 deletions(-)
>>>>
>>>> diff --git a/block.c b/block.c
>>>> index 0668c4b..61c7c6a 100644
>>>> --- a/block.c
>>>> +++ b/block.c
>>>> @@ -1376,6 +1376,13 @@ void bdrv_append(BlockDriverState *bs_new, 
>>>> BlockDriverState *bs_top)
>>>>                bs_new->drv ? bs_new->drv->format_name : "");
>>>>    }
>>>>
>>>> +/* revert the action */
>>>> +void bdrv_deappend(BlockDriverState *bs_new, BlockDriverState *bs_top)
>>>> +{
>>>> +    bdrv_swap(bs_new, bs_top);
>>>> +    /* this is enough? */
>>>> +}
>>>
>>> What will this be used for? Maybe it's better to introduce a function
>>> simple as this only when it's actually used.
>>>
>>     If bdrv_append is called before, this function should revert it, so
>> new file created at the top of the backing file chain is dropped.
> 
> Yes, I understand that. I meant which functionality/feature will make
> use of the function?
> 
> Kevin
> 
  I have used it in group snapshot transaction canceling callback, but
currently it will never be executed because updating step never
fail, so it can be removed but leaves a comments that need add in
if an updating function which may fail....



-- 
Best Regards

Wenchao Xia


Reply via email to