Received: from eggs.gnu.org ([2001:4830:134:3::10]:37116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxzmT-0000dx-VJ for qemu-devel@nongnu.org; Thu, 28 May 2015 11:31:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxzlt-0002dA-19 for qemu-devel@nongnu.org; Thu, 28 May 2015 11:31:37 -0400 From: Alberto Garcia In-Reply-To: <556732FC.4050803@redhat.com> References: <8007efe81120cd72f7c4145b8bbc3f4bc558e62d.1432719752.git.berto@igalia.com> <55672CA2.10105@redhat.com> <556730A1.40705@redhat.com> <556730C4.60903@redhat.com> <556732FC.4050803@redhat.com> Date: Thu, 28 May 2015 17:30:50 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: Max Reitz , Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi On Thu 28 May 2015 05:23:40 PM CEST, Max Reitz wrote: >>>> Can we mark the parameter optional, and only provide it when it is >>>> non-zero? That way, qemu-img (which cannot set an interval) will >>>> not report it, and the only time it will appear is if it was set as >>>> part of opening the block device under qemu. >>> That sounds good. >> But what do we do with the other parameters (refcount-cache-size, >> l2-cache-size)? We cannot have the same solution there because they >> don't belong to the image file either, and they're never going go be >> zero. > Of course, the simplest solution is to worry about cache-clean-interval=20 > for now and worry about the cache sizes later=E2=80=A6 But that basically= means=20 > "We'll never worry about them unless someone complains", so=E2=80=A6 My worry is that the solution works in this case because the default value happens to be 0 and means "disabled", so it makes sense, but it doesn't work in general with other parameters, so we would be adding something that we know it's ad-hoc. Berto