From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrXcP-0007Ma-2d for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:05:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrXS4-0001hz-JF for qemu-devel@nongnu.org; Tue, 25 Jun 2013 13:54:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrXE7-00054v-CK for qemu-devel@nongnu.org; Tue, 25 Jun 2013 13:40:23 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5PHeJAd000777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Jun 2013 13:40:21 -0400 Date: Tue, 25 Jun 2013 10:40:13 -0700 From: Ian Main Message-ID: <20130625174012.GA24471@gate.mains.priv> References: <1372163039-28332-1-git-send-email-stefanha@redhat.com> <20130625132638.GL3539@dhcp-200-207.str.redhat.com> <51C99FF7.5060705@redhat.com> <20130625140621.GN3539@dhcp-200-207.str.redhat.com> <51C9AB05.8000902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51C9AB05.8000902@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: add drive_backup HMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi On Tue, Jun 25, 2013 at 04:36:53PM +0200, Paolo Bonzini wrote: > Il 25/06/2013 16:06, Kevin Wolf ha scritto: > > Am 25.06.2013 um 15:49 hat Paolo Bonzini geschrieben: > >> Il 25/06/2013 15:26, Kevin Wolf ha scritto: > >>>>> + if (!full) { > >>>>> + error_setg(&errp, "-f is not yet implemented"); > >>>>> + hmp_handle_error(mon, &errp); > >>>>> + return; > >>>>> + } > >>> Then why make it a valid option and confuse users in the help text by > >>> describing options that don't really exist? > >> > >> Because otherwise we're stuck with a meaning of the flag that is > >> different between drive-mirror and block-backup. > > > > Do you mean when "otherwise" isn't only "we don't add -f now", but also > > "we accidentally add a -f with different meaning later"? Not sure if > > there's a real danger of that when we're aware that we want -f with the > > same meaning as for mirroring. > > We have drive-mirror with: > * the default is 'top' > * -f gives 'full' > > block-backup for now only implements 'full'. If we do not force the > user to add -f, the default is 'full' and we should not change it later. > > However, I would move the "not yet implemented" error from HMP to QMP. > This way, both drive-mirror and block-backup will have a mandatory > 'sync' argument. We plan to implement it anyway, and it makes sense imo > to avoid gratuitous differences in the APIs. I'm working on a patch to implement sync modes. I should be posting it soon. Ian