From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1NmM-0004ui-La for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1NmK-0001Wc-Hm for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:31:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1NmK-0001WO-8E for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:31:52 -0400 Date: Tue, 14 Aug 2012 17:32:32 -0300 From: Luiz Capitulino Message-ID: <20120814173232.69e2bae2@doriath.home> In-Reply-To: <871uj9rzjv.fsf@blackfin.pond.sub.org> References: <1344951151-26387-1-git-send-email-aliguori@us.ibm.com> <20120814114940.68c296c7@doriath.home> <87ipcls1f6.fsf@codemonkey.ws> <871uj9rzjv.fsf@blackfin.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block-migration: deprecate block migration for the 1.2 release List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi On Tue, 14 Aug 2012 22:25:40 +0200 Markus Armbruster wrote: > Anthony Liguori writes: > > > Luiz Capitulino writes: > > > >> On Tue, 14 Aug 2012 08:32:31 -0500 > >> Anthony Liguori wrote: > >> > >>> To be replaced with live block copy. > >>> > >>> Signed-off-by: Anthony Liguori > >>> --- > >>> migration.c | 9 +++++++++ > >>> 1 files changed, 9 insertions(+), 0 deletions(-) > >>> > >>> diff --git a/migration.c b/migration.c > >>> index 653a3c1..babccf4 100644 > >>> --- a/migration.c > >>> +++ b/migration.c > >>> @@ -482,10 +482,19 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, > >>> MigrationParams params; > >>> const char *p; > >>> int ret; > >>> + static bool suppress_deprecation_message; > >>> > >>> params.blk = blk; > >>> params.shared = inc; > >>> > >>> + if (blk && !suppress_deprecation_message) { > >>> + qerror_report(ERROR_CLASS_GENERIC_ERROR, > >>> + "Block migration is deprecated. " > >>> + "See http://wiki.qemu.org/Features/LiveBlockCopy " > >>> + "for an alternative syntax."); > >> > >> Why not error_set()? > > > > Because we fall through (we don't fail). This is just a warning. > > > > If you error_set(), then the migration command fails. We don't want it > > to fail. > > > > I guess qerror_report will do that too :-( > > > > I'll change it to an fprintf :-(( > > Please use error_report(), to ensure it's visible in the monitor. The user targeted warning should be added to hmp_migrate(), where we can use monitor_printf(). The fprintf() call is fine here, for those who use qmp and get stuff written to stderr logged.