Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-26 Thread James Bottomley
On Sat, 2005-03-26 at 09:27 +0200, Kai Makisara wrote: > I fully agree that doing done() correctly _is_ a problem, especially when > the SCSI subsystem evolves and the high-level driver writers do not follow > the development closely enough. > > One solution to these problems would be to let the

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-25 Thread Kai Makisara
On Fri, 25 Mar 2005, James Bottomley wrote: > On Fri, 2005-03-25 at 14:38 +0900, Tejun Heo wrote: > > We have users of scsi_do_req() other than scsi_wait_req() and they > > use different done() functions to do different things. I've checked > > other done functions and none uses contents inside

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-25 Thread James Bottomley
On Sat, 2005-03-26 at 06:43 +0900, Tejun Heo wrote: > 1. Allocate scsi_request and request (two are linked) This can't be done because the scsi_cmnd's are allocated specially (slab with reserve pool). James - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-25 Thread Tejun Heo
Hello, James. James Bottomley wrote: > On Fri, 2005-03-25 at 14:38 +0900, Tejun Heo wrote: > >> We have users of scsi_do_req() other than scsi_wait_req() and they >>use different done() functions to do different things. I've checked >>other done functions and none uses contents inside the pass

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-25 Thread James Bottomley
On Fri, 2005-03-25 at 14:38 +0900, Tejun Heo wrote: > We have users of scsi_do_req() other than scsi_wait_req() and they > use different done() functions to do different things. I've checked > other done functions and none uses contents inside the passed > scsi_cmnd, so using a dummy command shou

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-24 Thread Tejun Heo
Hi, On Thu, Mar 24, 2005 at 11:02:45PM -0600, James Bottomley wrote: > On Fri, 2005-03-25 at 12:15 +0900, Tejun Heo wrote: > > I think I found the cause. Special requests submitted using > > scsi_do_req() never initializes ->end_io(). Normally, SCSI midlayer > > terminates special requests ins

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-24 Thread James Bottomley
On Fri, 2005-03-25 at 12:15 +0900, Tejun Heo wrote: > I think I found the cause. Special requests submitted using > scsi_do_req() never initializes ->end_io(). Normally, SCSI midlayer > terminates special requests inside the SCSI midlayer without passing > through the blkdev layer. However, if

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-24 Thread Tejun Heo
Hello, James and Jens. On Thu, Mar 24, 2005 at 06:45:58PM -0600, James Bottomley wrote: > On Wed, 2005-03-23 at 16:25 +0100, Jens Axboe wrote: > > Let me guess, it is hanging in wait_for_completion()? > > Yes, I have the trace now. Why is curious. This is the trace of the > failure: > > Mar 2

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-24 Thread James Bottomley
On Wed, 2005-03-23 at 16:25 +0100, Jens Axboe wrote: > Let me guess, it is hanging in wait_for_completion()? Yes, I have the trace now. Why is curious. This is the trace of the failure: Mar 24 18:40:34 localhost kernel: usb 4-2: USB disconnect, address 3 Mar 24 18:40:34 localhost kernel: sd 0:0

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-23 Thread Jens Axboe
On Wed, Mar 23 2005, James Bottomley wrote: > On Wed, 2005-03-23 at 08:19 +0100, Jens Axboe wrote: > > It is not the oops I am getting. When I get a few minutes today, I'll > > reproduce with vanilla and post it here. > > Well, I have news too. Unfortunately, the python script I posted is > hangi

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-23 Thread James Bottomley
On Wed, 2005-03-23 at 08:19 +0100, Jens Axboe wrote: > It is not the oops I am getting. When I get a few minutes today, I'll > reproduce with vanilla and post it here. Well, I have news too. Unfortunately, the python script I posted is hanging in D wait. When I tested all of this out (with a sim

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-23 Thread James Bottomley
On Wed, 2005-03-23 at 13:50 +0900, Tejun Heo wrote: > Well, but it's because scsi midlayer calls back into usb-storage eh > after the detaching process is complete. Yes, but that's legitimate. It's always been explicitly stated that we can't ensure absolute synchronisation in the stack: stora

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread Jens Axboe
On Wed, Mar 23 2005, Tejun Heo wrote: > Hi, > > James Bottomley wrote: > >On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: > > > >>When hot-unplugging using scsi_remove_host() function (as usb > >>does), scsi_forget_host() used to be called before > >>scsi_host_cancel(). So, the d

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread Tejun Heo
Hi, James Bottomley wrote: On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: When hot-unplugging using scsi_remove_host() function (as usb does), scsi_forget_host() used to be called before scsi_host_cancel(). So, the device gets removed first without request cle

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread James Bottomley
On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: > When hot-unplugging using scsi_remove_host() function (as usb > does), scsi_forget_host() used to be called before > scsi_host_cancel(). So, the device gets removed first without > request cleanup and scsi_host_cancel()

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread Tejun Heo
08_scsi_hot_unplug_fix.patch When hot-unplugging using scsi_remove_host() function (as usb does), scsi_forget_host() used to be called before scsi_host_cancel(). So, the device gets removed first without request cleanup and scsi_host_cancel() never gets to call