From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzsYM-0002ga-R5 for qemu-devel@nongnu.org; Thu, 18 Jul 2013 14:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzsYJ-0003AN-Tr for qemu-devel@nongnu.org; Thu, 18 Jul 2013 14:03:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzsYJ-0003A8-Mp for qemu-devel@nongnu.org; Thu, 18 Jul 2013 14:03:43 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6II3gA5002342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Jul 2013 14:03:42 -0400 Date: Thu, 18 Jul 2013 11:03:39 -0700 From: Ian Main Message-ID: <20130718180339.GA13675@gate.mains.priv> References: <1374091462-18391-1-git-send-email-imain@redhat.com> <1374091462-18391-5-git-send-email-imain@redhat.com> <51E82579.20201@redhat.com> <51E826C4.6090300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E826C4.6090300@redhat.com> Subject: Re: [Qemu-devel] [PATCH V4 4/4] Change default to qcow2 for sync mode none. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org On Thu, Jul 18, 2013 at 11:32:52AM -0600, Eric Blake wrote: > On 07/18/2013 11:27 AM, Eric Blake wrote: > > >> if (!has_format) { > >> - format = mode == NEW_IMAGE_MODE_EXISTING ? NULL : bs->drv->format_name; > >> + format = mode == NEW_IMAGE_MODE_EXISTING ? NULL : "qcow2"; > > > > Is this the right thing to do? Or should we do: > > > > if (!has_format) { > > if (mode == NEW_IMAGE_MODE_EXISTING) { > > format = NULL; > > } else { > > format = bs->drv->format_name ?: "qcow2"; > > } > > } > > > > That is, I think we should default to doing a backup in the format given > > by the original (what if the original is qed, which also supports > > backing files), and only use qcow2 when there is no guidance whatsoever. > > > > But in practice, I don't care > > Well, I _DO_ care about one thing - make sure that the qapi-schema.json > page accurately documents how this variable is defaulted for callers > that don't care about the implications of omitting a format. > > Or we could simplify life by making 'format' mandatory for drive-backup; > it was optional for 'drive-mirror' due to incremental implementation, > but for 'drive-backup', we still have the opportunity to do things right > from the first release. Ah, I did make a doc change, I must have forgotten to add it. I'm all for making format mandatory if that is ok with everyone. Maybe that is the best solution. Ian