On Sat, 2005-09-17 at 22:33 -0400, Alan Stern wrote:
> > OK, I looked at making this work while reaping the target correctly, but
> > I couldn't (basic problem is that the target list keeps the target until
> > it has no more devices, a condition that could be made untrue by
> > something as simple as an open of the sysfs file).
> 
> Sorry, I'm a bit slow tonight.  I thought you _wanted_ the target to hang
> around until it had no more devices.  (Wasn't that the whole point of
> scsi_target_reap?)  What's wrong with keeping the target until the sysfs
> file is closed?

nothing ... that happens regardless (with either patch).

> > So, rather than try that, I thought a better approach might be to make
> > the host state model work for us.  i.e. if we know the host is being
> > removed, there's no point allowing target or device removal because at
> > some point the host removal will do it for us.  This enforcement would
> > ensure we're the only legitimate removers of the target and device.
> 
> How does this make things any better?  You still face the problem that an 
> open sysfs file will delay device removal and target reaping, if all the 
> devices on that target are hot-unplugged and the host remains alive and 
> active.

Actually, since we don't need the target reaping in the host removal (it
would be reaped when the device is removed), I agree ... I'll put your
original patch in.

Thanks,

James



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to