From: James Bottomley <James.Bottomley@suse.de>
To: Menny_Hamburger@Dell.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] sd: sd should not modify read capacity, cache type or write protect flag on rescan when there is a transport error
Date: Mon, 28 Feb 2011 09:34:50 -0600 [thread overview]
Message-ID: <1298907291.2487.18.camel@mulgrave.site> (raw)
In-Reply-To: <D8C50530D6022F40A817A35C40CC06A706576F76F2@DUBX7MCDUB01.EMEA.DELL.COM>
On Sun, 2011-02-27 at 14:21 +0000, Menny_Hamburger@Dell.com wrote:
> From: Menny Hamburger <Menny_Hamburger@Dell.com>
>
> When sd scan fails in apprehending capacity, cache_type or write protect flag
> property from the device, it automatically assigns a default value to the
> failed property. When rescanning, in case of transport/host error, this default
> value is invalid since the problem is with the connection to the device and not in
> the device itself that may (in most cases) still be intact. Applying a default value
> when failing may lead to problems when connection is re-established since the default
> value persists unless an additional rescan is performed.
That's correct. Zero means we know there's something there but we
couldn't get the necessary information. A zero size device can't be
read from or written to.
> This problem was witnessed when running in a iSCSI environment under multipath
> (with I/O on the active path). In this case we get a ping-ping effect where
> multipathd switches between alternate paths forever (until rescan) because the
> path checker states that the device is OK, and I/O fails immediately because of
> the 0 capacity (assigned to the device when rescanning while the device was
> disconnected from the storage).
>
> Reproduction over ISCSI environment:
> 1) dd if=/dev/dm-0 of=/dev/zero bs=64 count=10000
> 2) ifdown ethN, ethM, ethK, ... (where ethX is an interface from which the
> machine establishes connection to the storage array).
> 3) iscsiadm -m session -R
> 4) ifup ethN, ethM, ethK, ...
This really doesn't look like a good idea. It's a layering violation in
that the SCSI mid layer now has to try to determine if certain command
failures are the result of host disruption.
The idea of believing a prior value if a READ_CAPACITY fails also
doesn't look to be such a good one. This could lead to volume
corruption if the disruption is part of an array configuration.
The correct fix looks to be to initiate a rescan when the host is active
via hotplug, and just teach the path checker about zero size devices?
James
next prev parent reply other threads:[~2011-02-28 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-27 14:21 [PATCH] sd: sd should not modify read capacity, cache type or write protect flag on rescan when there is a transport error Menny_Hamburger
2011-02-27 14:51 ` Matthew Wilcox
2011-02-28 15:34 ` James Bottomley [this message]
2011-03-08 9:30 ` Menny_Hamburger
2011-03-08 14:22 ` James Bottomley
2011-03-10 0:01 ` Mike Christie
2011-03-10 8:49 ` Menny_Hamburger
2011-03-10 20:28 ` Mike Christie
2011-03-24 11:10 ` Menny_Hamburger
-- strict thread matches above, loose matches on Subject: below --
2011-02-27 14:58 Menny_Hamburger
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=1298907291.2487.18.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=Menny_Hamburger@Dell.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