From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxH9C-0001Jp-ES for qemu-devel@nongnu.org; Tue, 26 May 2015 11:52:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxH9B-0003XZ-EL for qemu-devel@nongnu.org; Tue, 26 May 2015 11:52:06 -0400 Message-ID: <55649697.5000100@redhat.com> Date: Tue, 26 May 2015 17:51:51 +0200 From: Max Reitz MIME-Version: 1.0 References: <11e5272e78e9c9485b47c41feedd6a30dbf0cb8e.1431967209.git.berto@igalia.com> <556493A0.5040004@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org On 26.05.2015 17:51, Alberto Garcia wrote: > On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz wrote: > >>> After having emptied the cache, the data in the cache tables is no >>> longer useful, so we can tell the kernel that we are done with it. In >>> Linux this frees the resources associated with it. >> Looks good, but by applying the same logic, you could do the same call >> in qcow2_cache_create(). So what about it? :-) > But after qcow2_cache_create() the memory is still unused so this > doesn't have any affect. That was too easy. Right. Reviewed-by: Max Reitz >> Also note that bdrv_commit() is used only by the HMP commit operation, >> not by QMP commit. > Thanks, I should probably clarify that in the commit message. > > Berto