All of lore.kernel.org
 help / color / mirror / Atom feed
* scsi_alloc_target: parent of the target (need not be a scsi host)
@ 2020-05-10 18:32 Douglas Gilbert
  2020-05-10 18:52 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Douglas Gilbert @ 2020-05-10 18:32 UTC (permalink / raw)
  To: SCSI development list

This gem is in scsi_scan.c in the documentation of that function's first
argument.
"need not be a scsi host" should read "it damn well better be a scsi host"
otherwise that function will crash and burn!

I'm trying to work out why the function: starget_for_each_device() in scsi.c
does _not_ use that collection right in front of it (i.e.
scsi_target::devices). Instead, it step up to the host level, and iterates
over all devices (LUs) on that host and only calls the given function for
those devices that match the channel and target numbers. That is bizarrely
wasteful if scsi_target::devices could be iterated over instead.

Anyone know why this is?

Doug Gilbert

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

end of thread, other threads:[~2020-05-11 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-10 18:32 scsi_alloc_target: parent of the target (need not be a scsi host) Douglas Gilbert
2020-05-10 18:52 ` James Bottomley
2020-05-10 21:50   ` Douglas Gilbert
2020-05-11 14:41     ` James Bottomley
2020-05-11 18:31       ` Douglas Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.