From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLBhq-0006DO-Sb for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:22:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLBhm-0002T1-NN for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:22:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLBhm-0002Sw-F7 for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:22:22 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1AEMLGr019358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 10 Feb 2015 09:22:21 -0500 Message-ID: <54DA141C.9070908@redhat.com> Date: Tue, 10 Feb 2015 07:22:20 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423574702-23072-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1423574702-23072-1-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lEq3mLl7JfCGj7nNwd9CEFXjTsQcHMcum" Subject: Re: [Qemu-devel] [PATCH] savevm: Improve error message for blocked migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lEq3mLl7JfCGj7nNwd9CEFXjTsQcHMcum Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/10/2015 06:25 AM, Kevin Wolf wrote: > If an internal snapshot can't be saved because migration is blocked > (most commonly probably because of AHCI), we had a really bad error > message: >=20 > $ echo -e "savevm foo\nquit" | qemu -M q35 /tmp/test.qcow2 -monitor std= io You know, 'echo -e' is non-portable (even in bash; you can change shopt so that it outputs a literal "-e" instead of turning on \ interpretation); it's worth getting used to using 'printf' for portability. But that doesn't affect your commit. > QEMU 2.2.50 monitor - type 'help' for more information > (qemu) savevm foo > Error -22 while writing VM > (qemu) quit >=20 > This patch converts qemu_savevm_state() to the Error infrastructure so > that a useful error pointing to the problematic device is produced now:= >=20 > $ echo -e "savevm foo\nquit" | qemu -M q35 /tmp/test.qcow2 -monitor std= io > QEMU 2.2.50 monitor - type 'help' for more information > (qemu) savevm foo > State blocked by non-migratable device '0000:00:1f.2/ich9_ahci' > (qemu) quit >=20 > Signed-off-by: Kevin Wolf > --- > savevm.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lEq3mLl7JfCGj7nNwd9CEFXjTsQcHMcum Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU2hQcAAoJEKeha0olJ0NqYOIH/Rux42BhBIjfuJNkOR/GhpKF GV9yGkQv85VB7dakHndR2zz+iKdwA2MQYq3Kb8orWAi/Hdyoi/QzbHnbbCzQgnt2 q/GE8TndBbDmnK5y1c9vBpF45HJBC3CRnuUhb05Rm/IcAfpC8r1z4kNBek+owFnR stZSWyqLFigS0St/5/vrBJ5rlikUXt0jhx5L/g+7EcLJElRVbRD+RpNP+Rjtm+U8 P/guyoK0vFg9jFbfU37skrwQ/FjFzN08hp1f0g2cAXMSZX/Guy9YIWu6/rsp39x5 BjlGn++/dMdDH1uHWD4ZoyHNEMfGEPNHVJfNkZNgILa1OyqbMM0OWjGC69jE3Rk= =gLr+ -----END PGP SIGNATURE----- --lEq3mLl7JfCGj7nNwd9CEFXjTsQcHMcum--