From: malahal@us.ibm.com
To: Luben Tuikov <ltuikov@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix to serialize unload and discovery
Date: Thu, 19 Oct 2006 14:20:49 -0700 [thread overview]
Message-ID: <20061019212048.GA26234@us.ibm.com> (raw)
In-Reply-To: <20061019205823.48812.qmail@web31802.mail.mud.yahoo.com>
Lubin, I am not sure if you are referring to your version of the driver
or the mainline version! If I read the mainline version correctly,
sas_deform_port() actually removes a phy from a port and also removes
all attached devices if it is the last phy in the port.
When a phy/port is gone, an event is posted to the work queue to
eventually call sas_deform_port(). Let me know if I misunderstood the
mainline version.
Thanks, Malahal.
Luben Tuikov [ltuikov@yahoo.com] wrote:
> --- malahal@us.ibm.com wrote:
> > sas_discover_domain() and sas_deform_port() assume that they are single
> > threaded and never run in parallel.
>
> This is indeed not true.
>
> > That is mostly true as we have a
> > single threaded work queue to handle discovery and other events.
>
> Hint: when the port is gone, it is gone...
>
> > The
> > only race I find is unloading a module will call sas_deform_port()
> > without watching if there is a discovery event is in progress. This
> > patch will stop queuing further events, flush the queue, and then call
> > sas_deform_port() to avoid the race.
>
> You need a much more elaborate (read: general solution, aka algorithm)
> framework to solve this.
>
> Needless to say, I don't observe these bugs and errors in my version
> of the SAS Stack.
>
> Luben
>
next prev parent reply other threads:[~2006-10-19 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 3:23 [PATCH] fix to serialize unload and discovery malahal
2006-10-19 20:58 ` Luben Tuikov
2006-10-19 21:20 ` malahal [this message]
2006-10-19 22:41 ` Luben Tuikov
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=20061019212048.GA26234@us.ibm.com \
--to=malahal@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ltuikov@yahoo.com \
/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