From: Hannes Reinecke <hare@suse.de>
To: Lev Vainblat <lev@zadarastorage.com>, linux-scsi@vger.kernel.org
Cc: Yaron Presente <yaron@zadarastorage.com>,
Alex Lyakas <alex@zadarastorage.com>
Subject: Re: Device is not becoming offline on failed TUR
Date: Tue, 19 Jan 2016 13:46:11 +0100 [thread overview]
Message-ID: <569E3013.9050407@suse.de> (raw)
In-Reply-To: <B653F0B7F68442D997F563AE5C6D634D@levpc2>
On 01/17/2016 11:54 AM, Lev Vainblat wrote:
> Hello,
>
> We have a virtual target that under some circumstances returns
> HARDWARE_ERROR (4/44) on TUR. Previously on initiator side
> scsi_check_sense() returned TARGET_ERROR, that in scsi_eh_tur() was
> converted to 1 (device not ready). And then scsi_eh_ready_devs()
> called scsi_eh_offline_sdevs to move device to the OFFLINE state.
>
> In commit
> http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=87f14e6
> this logic has been changed. Now on HARDWARE_ERROR
> scsi_check_sense() only sets DID_TARGET_FAILURE and returns SUCCESS.
> As a result device remains "running", and scsi_eh_flush_done_q()
> doesn't finish the command but retries it. So in this case it takes
> for the stuck command much more time to finish.
>
> Am I missing something? Is it a bug or intentional new behavior?
>
That is intentional.
We should only ever set the device to 'offline' is we cannot
communicate with it.
If we can (and that is the case here, as the drive returns a sense
code) the communication is okay, and the device should not be set to
offline.
It's up to the driver/calling application to correctly handle the
sense code.
As usual.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-01-19 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-17 10:54 Device is not becoming offline on failed TUR Lev Vainblat
2016-01-19 12:46 ` Hannes Reinecke [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=569E3013.9050407@suse.de \
--to=hare@suse.de \
--cc=alex@zadarastorage.com \
--cc=lev@zadarastorage.com \
--cc=linux-scsi@vger.kernel.org \
--cc=yaron@zadarastorage.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.