From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxzOk-0008PG-SJ for qemu-devel@nongnu.org; Thu, 28 May 2015 11:07:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxzOe-00017E-SL for qemu-devel@nongnu.org; Thu, 28 May 2015 11:07:06 -0400 Message-ID: <55672F0B.4010509@redhat.com> Date: Thu, 28 May 2015 17:06:51 +0200 From: Max Reitz MIME-Version: 1.0 References: <8007efe81120cd72f7c4145b8bbc3f4bc558e62d.1432719752.git.berto@igalia.com> <55672CA2.10105@redhat.com> <55672E90.4080204@redhat.com> In-Reply-To: <55672E90.4080204@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi On 28.05.2015 17:04, Max Reitz wrote: > On 28.05.2015 17:02, Alberto Garcia wrote: >> On Thu 28 May 2015 04:56:34 PM CEST, Max Reitz wrote: >>>> 'compat': 'str', >>>> '*lazy-refcounts': 'bool', >>>> '*corrupt': 'bool', >>>> - 'refcount-bits': 'int' >>>> + 'refcount-bits': 'int', >>>> + 'cache-clean-interval': 'int' >>>> } } >>> I'm not too happy about making this part of ImageInfoSpecificQCow2. >>> Two reasons for this: First, it's eventually part of ImageInfo, which >>> is defined as "Information about a QEMU image file", but this option >>> cannot be set in the image file itself but is only a run-time option. >> That's a valid point. Now that I think of it, do we actually have a wa= y >> to retrieve the sizes of the L2 and refcount caches? I think cache-siz= e, >> l2-cache-size, and refcount-cache-size are already write-only values. > > No, in fact we don't. Well, except for if you manage to retrieve the=20 > JSON filename for the qcow2 BDS, it should be part of that. :-P And I just noticed, passing that option will result in qemu returning=20 the JSON filename when queried: $ qemu-img info "json:{'l2-cache-size':65536,'file.filename':'test.qcow2'= }" image: json:{"driver": "qcow2", "l2-cache-size": 65536, "file":=20 {"driver": "file", "filename": "test.qcow2"}} [=85] Max