public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-scsi@vger.kernel.org, linux-driver@qlogic.com,
	james.smart@emulex.com
Subject: Re: [RFC] Asynchronous scanning for FC/SAS version 3
Date: Wed, 22 Nov 2006 11:19:08 -0800	[thread overview]
Message-ID: <20061122191908.GK1538@andrew-vasquezs-computer.local> (raw)
In-Reply-To: <20061122175125.GW18567@parisc-linux.org>

On Wed, 22 Nov 2006, Matthew Wilcox wrote:
> On Wed, Nov 22, 2006 at 08:19:26AM -0800, Andrew Vasquez wrote:
> > +static int
> > +qla2xxx_scan_finished(struct Scsi_Host *shost, unsigned long time)
> > +{
> > +       scsi_qla_host_t *ha = (scsi_qla_host_t *)shost->hostdata;
> > +
> > +       if (!ha->host)
> > +               return 1;
> > +       if (time > ha->loop_reset_delay * HZ)
> > +               return 1;
> > +
> > +       return atomic_read(&ha->loop_state) == LOOP_READY;
> > +}
> > 
> > is the *first* instance where the firmware/driver has attained a
> > steady link state within the topology.  The 'found all the devices
> > there are to find' case may or may not fall within this window...
> 
> Ah, fair point, I didn't *quite* understand the distinction between the
> various flags; can you suggest a better condition to test?

I don't really think there's a 'better' condition to test for given
there's isn't a state at which a driver:

- knows how to define 'all devices'
- is in control of ports beyond its single interconnect (as is
  the case of a fabric) from the HBA to the switch port.

My only point is that when the LOOP_READY state is attained for the
first time, we'll have only discovered devices (ports) present at
precisely that point in time -- i.e. two seconds (one second, 10
miliseconds) later (perhaps due to some hiccup on the fabric) an RSCN
could occur, an SNS rescan performed, and some new target-capable
device is discovered...

Anyway, just something we need to keep in mind going forward... It's
also another reason why lun-discovery is triggered indirectly during
an fc_remote_port_add()...

      reply	other threads:[~2006-11-22 19:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 15:26 [RFC] Asynchronous scanning for FC/SAS version 3 Matthew Wilcox
2006-11-15 13:55 ` James Smart
2006-11-20 19:21 ` Andrew Vasquez
2006-11-20 20:11   ` Matthew Wilcox
2006-11-22 16:19     ` Andrew Vasquez
2006-11-22 16:22       ` [PATCH 1/2] Defer topology discovery to DPC thread during initialization Andrew Vasquez
2006-11-22 16:24         ` [PATCH 2/2] Add asynchronous scsi scanning support Andrew Vasquez
2006-11-22 17:51       ` [RFC] Asynchronous scanning for FC/SAS version 3 Matthew Wilcox
2006-11-22 19:19         ` Andrew Vasquez [this message]

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=20061122191908.GK1538@andrew-vasquezs-computer.local \
    --to=andrew.vasquez@qlogic.com \
    --cc=james.smart@emulex.com \
    --cc=linux-driver@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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