public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: James.Smart@Emulex.Com, linux-scsi@vger.kernel.org
Subject: Re: [Patch] Correct issue with midlayer scsi target allocation and transports that create the targets
Date: Sat, 11 Jun 2005 11:15:16 -0700	[thread overview]
Message-ID: <20050611181516.GA8555@us.ibm.com> (raw)
In-Reply-To: <20050611153745.GA31943@infradead.org>

On Sat, Jun 11, 2005 at 04:37:45PM +0100, Christoph Hellwig wrote:

> > +	if (shost->transportt->target_parent) {
> > +		spin_lock_irqsave(shost->host_lock, flags);
> > +		parent = shost->transportt->target_parent(shost, channel, id);
> > +		spin_unlock_irqrestore(shost->host_lock, flags);
> > +		if (!parent)
> > +			return NULL;
> > +	}
> 
> Ok, this idea is a lot better, but I think scsi_alloc_target is still
> the wrong place to put this.  It has an explicit parent argument that
> all but one of it's callers get right, and we're now totally ignoring
> and looking it up again when the transport has a ->target_parent method.
> 
> I'm not totally sure where the right place to put it in the
> scsi_scan_host_selected path is, though.  Probably scsi_scan_host_selected
> shoud just become __scsi_scan_host_selected, scsi_scan_host would call
> it directly but the sysfs and legacy procfs scanning would call the method.
> 
> Or it might be better to give the transport completely control over the
> scan sysfs attribute, that way we could even allow scanning by WWNs or
> similar things.

What do you think of Mike C's patch, to add a transportt->scan function?

http://marc.theaimsgroup.com/?l=linux-scsi&m=111671146532103&w=2

It needs a bit more code in the transport compared to the above. It also
allows the transport to more efficiently scan (the transport can scan only
devices it knows are attached, versus all id's up to max_id).

If the scsi_target (sysfs targetC:I:L) was always under the scsi_host
(syfs hostH) in the device tree there would no problem. Then the transport
specific target object (like rport for FC) would have to be parallel to or
under the target.

-- Patrick Mansfield

  reply	other threads:[~2005-06-11 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-11  2:24 [Patch] Correct issue with midlayer scsi target allocation and transports that create the targets James.Smart
2005-06-11 15:37 ` Christoph Hellwig
2005-06-11 18:15   ` Patrick Mansfield [this message]
2005-06-11 18:18     ` Christoph Hellwig
2005-06-14 22:17   ` [Patch] take 4: " Patrick Mansfield
2005-06-14 22:35     ` Christoph Hellwig
2005-06-14 22:54       ` Patrick Mansfield
2005-06-17 11:11         ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2005-06-10 19:03 [Patch] " James.Smart
2005-06-10 20:25 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050611181516.GA8555@us.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=James.Smart@Emulex.Com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox