Re: [PATCH] scsi_set_host_offline (resend)

Patrick Mansfield
2003-03-29T00:31:09Z

On Thu, Mar 27, 2003 at 09:42:39AM -0600, James Bottomley wrote:
> On Tue, 2003-03-25 at 17:29, Mike Anderson wrote:
> > I thought we where looking at a solution for all traversals of the list?
> > There are currently ~52 refs to my_devices, while some traversals can be
> > evalutated and possibly removed there maybe valid ones that happen
> > without user context.
>
> Sorry, I was thinking both short and long term.
>
> Short term, it's probably easiest for the firewire stuff to access the
> offline and removal functions from user land hotplug scripts (so they
> don't actually need the in-kernel hook).
>
> Long term we do need to see if we can go to a nice refcounted model for
> all 50 odd list traversals. At least auditing them to see if we can use
> a semaphore everywhere.
>
> James

same_target_siblings has a similiar problem.

It is used primarily for the single_lun code, sometimes in softirq context
(should really not sleep there), and also to get any exisiting scsi_level
during scan.

-- Patrick Mansfield