Hi, On Thu, May 20, 2010 at 3:32 PM, Tejun Heo <tj@xxxxxxxxxx> wrote: > On 05/17/2010 01:32 PM, Prashant wrote: >> Hi, >> I have a board with backplane for SATA disks. Sometimes when I unplug >> a disk while >> IO is going on, I get following problem. Has anybody of you >> experienced this before? >> Sometimes spinlock owner is kblockd, sometimes it is scsi_eh. > > Sorry but 2.6.24 is way too ancient at this point and too much has > changed. Can you please try a recent kernel and see whether the > problem is reproducible? > Okay I 'll update If I get same problem with latest kernel (will take lot of time). I have a question related to code which is almost same in the current kernel. I don't know whether this is the right mailing list for the following question. When a sata drive is unplugged, its corresponding sdev's state is set to SDEV_OFFLINE. Now if IO requests are still comming on the same device, They will be killed by calling scsi_kill_request(). 1) scsi_kill_request does following things: i) Unlock request queue ii) Increment host_busy count iii) Lock request queue iv) Calls __scsi_done() 2) __scsi_done() does following things: i) set request completion data ii) Calls blk_completion_request() 3) blk_completion_request() does following things: i) Adds request->donelist to blk_cpu_done softirq queue and raise the softirq (which is scsi_softirq_done) 4) next sequence is: scsi_softirq_done >> scsi_finish_command >> scsi_device_unbusy() 5) scsi_device_unbusy() again locks the request_queue. This is the place where we can get into the spinlock recursion. Is this correct? Please correct me if something is wrong. Thanks, Prashant -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html