From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSfaT-0001yU-Ne for qemu-devel@nongnu.org; Fri, 21 Aug 2015 02:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSfaS-0000PF-Pd for qemu-devel@nongnu.org; Fri, 21 Aug 2015 02:14:01 -0400 References: <1440058448-27847-1-git-send-email-pl@kamp.de> <1440058448-27847-3-git-send-email-pl@kamp.de> From: Eric Blake Message-ID: <55D6C1A2.6020706@redhat.com> Date: Thu, 20 Aug 2015 23:13:54 -0700 MIME-Version: 1.0 In-Reply-To: <1440058448-27847-3-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TudMgtPHh68Ah9Kddkhg03U1CllvL1Xsh" Subject: Re: [Qemu-devel] [PATCH 2/2] ide/atapi: partially avoid deadlock if the storage backend is dead List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, jsnow@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TudMgtPHh68Ah9Kddkhg03U1CllvL1Xsh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/20/2015 01:14 AM, Peter Lieven wrote: > the blk_drain_all() that is executed if the guest issues a DMA cancel > leads to a stuck main loop if the storage backend (e.g. a NFS share) > is unresponsive. >=20 > This scenario is a common case for CDROM images mounted from an > NFS share. In this case a broken NFS server can take down the > whole VM even if the mounted CDROM is not used and was just not > unmounted after usage. >=20 > This approach avoids the blk_drain_all for read-only media and > cancelles the AIO locally and makes the callback a NOP if the s/cancelles/cancels/ > original request is completed after the NFS share is responsive > again. >=20 > Signed-off-by: Peter Lieven > --- > hw/ide/pci.c | 32 ++++++++++++++++++-------------- > 1 file changed, 18 insertions(+), 14 deletions(-) > + if (!bdrv_is_read_only(bm->bus->dma->aiocb->bs)) { > + /* We can't cancel Scatter Gather DMA in the middl= e of the > + * operation or a partial (not full) DMA transfer = would > + * reach the storage so we wait for completion ins= tead > + * (we beahve like if the DMA was completed by the= time the s/beahve like/behave as/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TudMgtPHh68Ah9Kddkhg03U1CllvL1Xsh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV1sGiAAoJEKeha0olJ0Nq3N0H/3JlntZtY1ubc49p0Aoln3dJ R5N3qIjYRcP1NzRlf/y3r33Q0SRv7sVdBsoLkZspJXIglrw16ERl5ncyMqaoiH6p irueXn+SkPcTLJdOrHYKC6+dFiQohvQi4U4baCJxUCC5NYpXv/DCAZFAaN4JPY1U +RiNy2abEARWVEVSemmuGXIuTU5OUKBa08bTGVoheZ9eeNlbC/v8FAwthHMFjJex xiUxoFGn6tdD+7yHWncntvVz7YU6mOn6/WdOc9EAaajCfQ1MUrQ+h+Jsc0wUjwZx GYdr1XPLvTcpWw1inFqUETVR5GTUTztnhWu/4nZBLmW0Po+iaESnBvOjmiEcqL8= =WGqZ -----END PGP SIGNATURE----- --TudMgtPHh68Ah9Kddkhg03U1CllvL1Xsh--