Messages in this thread | ![/](/images/icornerl.gif) | | From | Bart Van Assche <> | Date | Tue, 30 Aug 2011 12:38:40 +0200 | Subject | Re: blkdev_issue_discard() hangs forever if the underlying storage device is removed |
| |
On Tue, Aug 30, 2011 at 4:01 AM, Dave Chinner <david@fromorbit.com> wrote: > On Mon, Aug 29, 2011 at 07:56:33PM +0200, Bart Van Assche wrote: >> A key fact here is that the block device to which the discard request >> was issued is gone, so the discard request will never finish >> successfully. Do all relevant error paths guarantee that >> blkdev_issue_discard() will finish in a finite time ? > > The underlying block device driver is supposed to handle timing out > of lost IOs and causcwinge them to be completed with an error. > blkdev_issue_discard() is simply waiting for that error to be > delivered. > > If the driver has not detected that an outstanding request has not > completed then that is a driver bug, not a bug in > blkdev_issue_discard(). IOWs, you should be asking the ib_srp people > why the in flight bio was not timed out or errored out when the > block device abort was run....
Sorry, but the above doesn't make sense. This issue has nothing to do with the ib_srp implementation: blkdev_issue_discard() was invoked by mkfs after ib_srp had removed the SCSI host associated with the block device. So none of the code in ib_srp has been invoked while processing this blkdev_issue_discard() call.
Bart.
| ![\](/images/icornerr.gif) |