From patchwork Tue Aug 22 17:02:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 9915769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D934F603F9 for ; Tue, 22 Aug 2017 17:04:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E90B21FFCA for ; Tue, 22 Aug 2017 17:04:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC02B288AD; Tue, 22 Aug 2017 17:04:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_HK_NAME_DR autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9CC4F1FFCA for ; Tue, 22 Aug 2017 17:04:16 +0000 (UTC) Received: from localhost ([::1]:37108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkCb9-0007SJ-GF for patchwork-qemu-devel@patchwork.kernel.org; Tue, 22 Aug 2017 13:04:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkCZJ-0006hT-2m for qemu-devel@nongnu.org; Tue, 22 Aug 2017 13:02:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkCZI-0006ub-CJ for qemu-devel@nongnu.org; Tue, 22 Aug 2017 13:02:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkCZI-0006uU-6J for qemu-devel@nongnu.org; Tue, 22 Aug 2017 13:02:20 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14D99C047B92; Tue, 22 Aug 2017 17:02:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 14D99C047B92 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dgilbert@redhat.com Received: from dgilbert-t530.redhat.com (ovpn-117-206.ams2.redhat.com [10.36.117.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76D6886E96; Tue, 22 Aug 2017 17:02:13 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, quintela@redhat.com, stefanha@redhat.com, christian.ehrhardt@canonical.com Date: Tue, 22 Aug 2017 18:02:12 +0100 Message-Id: <20170822170212.27347-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 22 Aug 2017 17:02:19 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] migration: Report when bdrv_inactivate_all fails X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Dr. David Alan Gilbert" If the bdrv_inactivate_all fails near the end of the migration, the migration will fail and often the only diagnostics in the log are an I/O error which you can't distinguish from an error on the socket connection. Add an error so we know when it's actually a block problem. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Stefan Hajnoczi --- migration/savevm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index fdd15fa0a7..7a55023d1a 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1157,6 +1157,8 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only, * bdrv_invalidate_cache_all() on the other end won't fail. */ ret = bdrv_inactivate_all(); if (ret) { + error_report("%s: bdrv_inactivate_all() failed (%d)", + __func__, ret); qemu_file_set_error(f, ret); return ret; }