[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ide_dma_cancel will result in partial DMA trans
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH] ide_dma_cancel will result in partial DMA transfer |
Date: |
Mon, 1 Sep 2008 12:21:54 +0100 |
Andrea Arcangeli writes ("[Qemu-devel] [PATCH] ide_dma_cancel will result in
partial DMA transfer"):
> while trying to track down weird fs corruption, I noticed the way the
> cmd_writeb ioport write cancels the I/O is not atomic from a DMA point
> of view if a SG table with more than one entry is used. The DMA
> command with qemu/kvm is aborted partially. Unfortunately I don't know
> the IDE specs well enough to know what happens in the hardware, but I
> doubt hardware will abort the DMA command in the middle. I wonder if
> this could explain fs corruption or not. If yes, this should possibly
> fix it.
We're talking about scatter/gather to host memory during DMA rather
than SG to different disk sectors (which is done via queued commands),
right ?
In which case we're talking about one of the READ or WRITE DMA family
being aborted. That's an unrecoverable error. According to the
specification I have here, various registers are supposed to indicate
the `address of the sector where the first unrecoverable error
occurred' but also says that `the amount of data transferred is
indeterminate'.
So I think the host can't safely assume anything about which parts of
the transfer have completed. `First' must surely mean temporally
first, rather than the sector with the lowest-address, and would seem
to be intended for diagnostic logging rather than error recovery.
Ian.
- Re: [Qemu-devel] [PATCH] ide_dma_cancel will result in partial DMA transfer,
Ian Jackson <=