From: Douglas Gilbert <dgilbert@interlog.com>
To: Candid Shot <candid_shot_1@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: scsi (sg) device status vs FC connectivity
Date: Tue, 21 Feb 2012 17:36:20 -0500 [thread overview]
Message-ID: <4F441C64.8070001@interlog.com> (raw)
In-Reply-To: <1329860107.22873.YahooMailNeo@web46407.mail.sp1.yahoo.com>
On 12-02-21 04:35 PM, Candid Shot wrote:
> (I hope this list is the right place to ask SG Driver related question ..)
>
> Background: A FC cable-pull is simulated by disabling the FC switch (Brocade) port.
>
>
> While /sys/class/fc_host/hostx/port_state might confirm the FC connectivity is missing,
>
> /proc/scsi/sg/devices will show the scsi device to be 'online'.
>
> My goal is to be able to return an error to the application, should a cable-pull happen.
>
> Is there a way to be able to tweak this behavior where the scsi driver is able to look at port events,
> and possibly return errors during read/write operations?
The sg driver works at the SCSI level and these days
asynchronous notifications are being left to the
transport layer.
I don't know much about FC. Using SAS (disks connected via
an expander which seems to be functionally similar to a
FC switch) then if an expander port connecting a disk
is disabled then the expander will generate a
Broadcast(Change) which all initiators (HBAs) should
receive and those HBAs should do another device discover
process. That should lead to various events being generated
which udev sees and removes the disk device node.
Hopefully someone who knows about FC and Linux can
supply more details for your case.
Doug Gilbert
next prev parent reply other threads:[~2012-02-21 22:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 21:35 scsi (sg) device status vs FC connectivity Candid Shot
2012-02-21 22:36 ` Douglas Gilbert [this message]
2012-02-22 3:21 ` James Bottomley
2012-02-22 9:02 ` Mike Christie
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=4F441C64.8070001@interlog.com \
--to=dgilbert@interlog.com \
--cc=candid_shot_1@yahoo.com \
--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;
as well as URLs for NNTP newsgroup(s).