[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] ide/atapi: partially avoid deadlock if the
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] ide/atapi: partially avoid deadlock if the storage backend is dead |
Date: |
Thu, 20 Aug 2015 23:13:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
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.
>
> 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.
>
> 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.
>
> Signed-off-by: Peter Lieven <address@hidden>
> ---
> 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 middle of
> the
> + * operation or a partial (not full) DMA transfer would
> + * reach the storage so we wait for completion instead
> + * (we beahve like if the DMA was completed by the time
> the
s/beahve like/behave as/
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature