From patchwork Wed Jul 8 07:41:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6741381 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2FA9C05AC for ; Wed, 8 Jul 2015 07:41:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC6E5206C7 for ; Wed, 8 Jul 2015 07:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0407F206F7 for ; Wed, 8 Jul 2015 07:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933865AbbGHHlX (ORCPT ); Wed, 8 Jul 2015 03:41:23 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58804 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934299AbbGHHlM (ORCPT ); Wed, 8 Jul 2015 03:41:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 931FFAC23; Wed, 8 Jul 2015 07:41:10 +0000 (UTC) From: Hannes Reinecke To: James Bottomley Cc: Bart van Assche , Christoph Hellwig , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state Date: Wed, 8 Jul 2015 09:41:08 +0200 Message-Id: <1436341268-91432-4-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1436341268-91432-1-git-send-email-hare@suse.de> References: <1436341268-91432-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a disk reports an ALUA 'transitioning' state we should not try to spin up the device. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7c0bdaa..180a6e8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1801,6 +1801,8 @@ sd_spinup_disk(struct scsi_disk *sdkp) if (sense_valid && sshdr.sense_key == NOT_READY) { if (sshdr.asc == 4 && sshdr.ascq == 3) break; /* manual intervention required */ + if (sshdr.asc == 4 && sshdr.ascq == 0xa) + break; /* transitioning */ if (sshdr.asc == 4 && sshdr.ascq == 0xb) break; /* standby */ if (sshdr.asc == 4 && sshdr.ascq == 0xc)