From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXr0l-0005Tn-Bd for qemu-devel@nongnu.org; Tue, 06 Dec 2011 04:08:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXr0k-0001Z0-Cr for qemu-devel@nongnu.org; Tue, 06 Dec 2011 04:08:27 -0500 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:51940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXr0j-0001Py-SH for qemu-devel@nongnu.org; Tue, 06 Dec 2011 04:08:26 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Dec 2011 10:01:25 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB6947hO3661880 for ; Tue, 6 Dec 2011 20:04:09 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB697eTd013135 for ; Tue, 6 Dec 2011 20:07:40 +1100 Message-ID: <4EDDDB5A.8020102@linux.vnet.ibm.com> Date: Tue, 06 Dec 2011 17:07:38 +0800 From: Zhi Hui Li MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] About the snapshot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , QEMU-devel Cc: zhihuili@cn.ibm.com 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 ? 2): in the function of qcow2_update_snapshot_refcount it has some " goto fail "; if the function runs some times, then something makes it goto fail, I am not sure whether it will make the refcount incorrect.