From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UobZI-0000lr-CH for qemu-devel@nongnu.org; Mon, 17 Jun 2013 11:42:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UobZC-0004EH-T7 for qemu-devel@nongnu.org; Mon, 17 Jun 2013 11:42:08 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:37494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UobZC-0004Dc-O1 for qemu-devel@nongnu.org; Mon, 17 Jun 2013 11:42:02 -0400 Received: by mail-wi0-f178.google.com with SMTP id k10so2320037wiv.5 for ; Mon, 17 Jun 2013 08:42:01 -0700 (PDT) Date: Mon, 17 Jun 2013 17:41:59 +0200 From: Stefan Hajnoczi Message-ID: <20130617154159.GD31444@stefanha-thinkpad.redhat.com> References: <1371124063-12971-1-git-send-email-kwolf@redhat.com> <1371124063-12971-4-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1371124063-12971-4-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/5] qcow2: Options to enable discard for freed clusters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com On Thu, Jun 13, 2013 at 01:47:41PM +0200, Kevin Wolf wrote: > @@ -532,6 +548,16 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags) > s->use_lazy_refcounts = qemu_opt_get_bool(opts, QCOW2_OPT_LAZY_REFCOUNTS, > (s->compatible_features & QCOW2_COMPAT_LAZY_REFCOUNTS)); > > + s->discard_passthrough[QCOW2_DISCARD_NEVER] = false, comma instead of semicolon? > @@ -187,6 +190,8 @@ typedef struct BDRVQcowState { > int qcow_version; > bool use_lazy_refcounts; > > + bool discard_passthrough[QCOW2_DISCARD_MAX]; > + Neat solution to specifying discard behavior. Stefan