From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Michael Reed <mdr@sgi.com>
Cc: dougg@torque.net, Arjan van de Ven <arjan@infradead.org>,
"Moore, Eric" <Eric.Moore@lsil.com>,
James Smart <James.Smart@Emulex.Com>,
linux-scsi@vger.kernel.org
Subject: Re: fibre channel sync cache question
Date: Wed, 26 Jul 2006 22:22:57 +0200 [thread overview]
Message-ID: <44C7CF21.2080204@s5r6.in-berlin.de> (raw)
In-Reply-To: <44C7B269.4070505@sgi.com>
Michael Reed wrote:
>>>>-- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
>>>>>Using fibre channel disks, I've noticed that when the system shuts down
>>>>>that the sd_driver issues a sync cache command to the device. I've
>>>>>also
>>>>>noticed that when the lldd is removed via rmmod that this sync cache is
>>>>>not executed. I would think that the sync cache would be desirable
>>>>>under this circumstance.
[...]
> I'm wondering about the policy of issuing a sync cache. There
> are target removal paths which result in it not being issued.
>
> So, the real question is: when a scsi target is removed, is it
> policy that sync cache will be issued?
>
> In fibre channel, here are two code paths in which sync cache
> is not issued.
>
> - removal of LLDD (rmmod)
> - removal of target via sysfs device/delete
[...]
This problem exists with all transports which use scsi_remove_device or
scsi_remove_host for soft device removal, as noted by Mike Christie in
"question about sd_sync_cache and shutdown" on 2006-07-12. He pointed
out that devices are brought into SDEV_CANCEL state before sd_shutdown
is entered. Therefore sd_shutdown does not sync the cache.
This behavior changed a few Linux releases ago. I cannot pinpoint the
responsible changeset. So, to answer your question about policy, there
is no fixed policy in the specification and implementation of the
mid-low SCSI API. Generally, neither "soft shutdown" nor "hot unplug"
can be explicitly signaled from LLD to the SCSI core.
Unless somebody comes up with a general solution for SCSI core, I am
planning to look for a particular solution in the sbp2 transport driver.
(When an sbp2 LU is to be taken down, check if it is still physically
present and somehow trigger SCSI high-level shutdown methods before
scsi_remove_device.)
--
Stefan Richter
-=====-=-==- -=== ==-=-
http://arcgraph.de/sr/
next prev parent reply other threads:[~2006-07-26 20:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 22:28 fibre channel sync cache question Moore, Eric
2006-07-25 22:39 ` Arjan van de Ven
2006-07-26 3:51 ` Douglas Gilbert
2006-07-26 18:20 ` Michael Reed
2006-07-26 18:40 ` Michael Reed
2006-07-26 20:22 ` Stefan Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-25 22:51 Moore, Eric
2006-07-25 22:22 Michael Reed
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=44C7CF21.2080204@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=Eric.Moore@lsil.com \
--cc=James.Smart@Emulex.Com \
--cc=arjan@infradead.org \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=mdr@sgi.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