[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] snapshot: export function in block.c
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] snapshot: export function in block.c |
Date: |
Tue, 08 Jan 2013 11:37:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
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 <address@hidden>
>>
>> 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