qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] About the snapshot


From: Zhi Hui Li
Subject: Re: [Qemu-devel] About the snapshot
Date: Tue, 6 Dec 2011 22:55:04 +0800



2011/12/6 Stefan Hajnoczi <address@hidden>
On Tue, Dec 6, 2011 at 10:01 AM, Zhi Hui Li <address@hidden> wrote:
> On 2011年12月06日 17:40, Stefan Hajnoczi wrote:
>>
>> On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Li<address@hidden>
>>  wrote:
>>>
>>>
>>> 1) :
>>>
>>> for example:
>>>
>>> BDRVQcowState *s = bs->opaque;
>>>
>>> s->snapshots
>>> s->nb_snapshots
>>>
>>>
>>> 1:use the command:   qemu-img snapshot ./test.qcow2  -c aa
>>> the memory of the s->snapshot don't free,
>>> if the s->nb_snapshots is large, Does it have some problems.
>>>
>>> 2: use the command:  qemu-system-x86_64  ./test.qcow2 -snapshot
>>> when the program ends, Does it need to free the s->snapshots ?
>>
Okay, I think you're saying that in #1 s->snapshots is leaked because
qcow2_free_snapshots() is not being called from qcow2_close().

Do you want to send a patch to fix this?
 
Ok, I will send a patch  tomorrow.
But I think in the #2  it also need to call qcow2_free_snapshots() , if you have called several times savevm,
the s->snapshots will very large, when the process end, it also need to free.
 
Thank you very much for your feedback !

Stefan



reply via email to

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