public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Questions about scsi_target_reap and starget/sdev lifecyle
@ 2005-06-14 21:27 Alan Stern
  2005-06-15  3:28 ` James Bottomley
  0 siblings, 1 reply; 30+ messages in thread
From: Alan Stern @ 2005-06-14 21:27 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI development list

James:

Can you or anyone else please explain what scsi_target_reap() and
especially what scsi_target.reap_ref are for?  What's the point of this
home-brewed reference counting scheme when there's already a perfectly
useful embedded struct device inside scsi_target?  Why isn't
scsi_target_reap() simply the release routine for the embedded device?

In addition, can someone please explain how long a scsi_target structure 
and a scsi_device structure are supposed to remain linked into the host's 
__targets and __devices lists once they have been removed?  The 
scsi_device link isn't severed until the release routine runs, which can 
be quite a long time after the device has been removed.  The scsi_target 
link is severed in scsi_target_reap(), which should be thought of as a
kind of release routine as well.

Won't this cause trouble in a hotplug environment?  A target or a LUN can 
be removed, and while it's still on the host's list a new target or LUN 
could be discovered with the same ID.  Having multiple entries on a list 
with the same ID sounds like a bad idea.  Is there some reason why these 
things aren't taken off their list as soon as they are removed?

Alan Stern


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2005-06-22 16:53 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-14 21:27 Questions about scsi_target_reap and starget/sdev lifecyle Alan Stern
2005-06-15  3:28 ` James Bottomley
2005-06-15 20:07   ` Alan Stern
2005-06-15 21:11   ` Alan Stern
2005-06-15 23:03     ` James Bottomley
2005-06-16  2:22       ` Alan Stern
2005-06-16  7:31         ` Mike Anderson
2005-06-16 13:57           ` James Bottomley
2005-06-17  2:01             ` Alan Stern
2005-06-18 20:14             ` Alan Stern
2005-06-20 15:52               ` Brian King
2005-06-20 16:35                 ` Alan Stern
2005-06-20 17:31                   ` Patrick Mansfield
2005-06-20 19:24                     ` Alan Stern
2005-06-21 17:12               ` Mike Anderson
2005-06-21 17:43                 ` Patrick Mansfield
2005-06-21 19:24                   ` Mike Anderson
2005-06-21 20:04                 ` Alan Stern
2005-06-21 20:10                   ` Christoph Hellwig
2005-06-21 20:33                     ` Alan Stern
2005-06-21 20:58                       ` Mike Anderson
2005-06-21 21:22                         ` Alan Stern
2005-06-22 13:44                         ` Luben Tuikov
2005-06-22 13:36                       ` Luben Tuikov
2005-06-22 15:12                         ` Alan Stern
2005-06-22 15:46                           ` Luben Tuikov
2005-06-22 16:16                             ` Alan Stern
2005-06-22 16:53                               ` Luben Tuikov
2005-06-21 21:08                   ` Mike Anderson
2005-06-21 21:37                     ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox