From patchwork Mon Oct 10 21:24:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xose Vazquez Perez X-Patchwork-Id: 9369967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AD67B607D2 for ; Mon, 10 Oct 2016 21:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CDBB28CEF for ; Mon, 10 Oct 2016 21:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 917CC28CF2; Mon, 10 Oct 2016 21:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAB1128CF0 for ; Mon, 10 Oct 2016 21:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbcJJVYf (ORCPT ); Mon, 10 Oct 2016 17:24:35 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36378 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbcJJVYe (ORCPT ); Mon, 10 Oct 2016 17:24:34 -0400 Received: by mail-lf0-f67.google.com with SMTP id b75so310281lfg.3 for ; Mon, 10 Oct 2016 14:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:mime-version :content-transfer-encoding; bh=KTMeaoRjXmU+SGvouSOxeLMAmNii6BbA0NFC1yC7AQk=; b=ROfvSCdRgEuAMymP9nyqAC+/Ku8nD3gEwoJ0CCP/CZhnXVlZIs8h6V2zQIdGoVBOPc u31kqPMlWlzc7Scea1YJAxuDw5uWUrFp5eWg7/Ul5CKS45Shv8ckLuwB8tx3DJ6Qt3Ti rUGUBoxCWQsJqnhU6lCGKdiXLljLLbrl1gO1e6p77nTgeuv+U+UyhiyxZ9u3QI5+lyYP VsYpwdv4k9uhrSMotoQifFZY/EmAmiTmwTTbkqpMbbXpsLPEYDbUcL9t/aWgpMtL821y 7R4/DqYIyKzGa3WDc4zb3h6JE7gtIGQDQU/TbOOKGN4K4sdU8o/37OvIqpcHffbC0Rqq zrhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:message-id:date:mime-version :content-transfer-encoding; bh=KTMeaoRjXmU+SGvouSOxeLMAmNii6BbA0NFC1yC7AQk=; b=FolTyn2q182MLIe+D57HDbsJrK750JGyqcr82IMKaZAwYwpUwjkZcjzLTRqa7OkEoF OaF6OEd8R2sSuHfsZlXwDPuRFuQQouLtKaNbwTnKz0pR6G5NEwVitoDUE6yK12ybA8I2 X0X6oImtlE38zk/QYSAANFk8hUmnIvG+Lf7vQmMwhiZx8B3761CPFB3zPLeDWDobaD4x 7D7WSazjRS4ruzt4ivWxEswwYN6vleO3rsUHdlK/sbi07va+coeuiNd7nLmyjUFGrxfJ BRxM7trOrrIyCFtIce0zcYiJtEDtAp/+B9Lozv93eUoCJ1hyc0nlCl8taPXiJOudyiw8 HtuA== X-Gm-Message-State: AA6/9RkJhzSrI7rtmzEUv8koHPEe/vLPf7uhsgVDxvlrSQWxuZazjLAvqegb5kiwDdFg6g== X-Received: by 10.194.220.232 with SMTP id pz8mr311445wjc.154.1476134653078; Mon, 10 Oct 2016 14:24:13 -0700 (PDT) Received: from localhost (146.174.78.188.dynamic.jazztel.es. [188.78.174.146]) by smtp.gmail.com with ESMTPSA id au8sm105584wjc.12.2016.10.10.14.24.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2016 14:24:12 -0700 (PDT) From: Xose Vazquez Perez Subject: Re: [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' To: Hannes Reinecke , "Stewart, Sean" , "George, Martin" , "Stankey, Robert" , "Schremmer, Steven" Cc: device-mapper development , linux-scsi Message-ID: <9c10ea3c-76e5-8aad-4b30-1fd34d9bf288@gmail.com> Date: Mon, 10 Oct 2016 23:24:11 +0200 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Hannes, Try #2. Is this needed for RDAC(INF-01-00) devices? Thank you. ---cut--- commit 851cde9909dd8b6fb90fab7f4e815c8f86c85a0d Author: Hannes Reinecke Date: Fri Feb 19 09:17:12 2016 +0100 scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' Add a new blacklist flag BLIST_SYNC_ALUA to instruct the alua device handler to use synchronous command submission for ALUA commands. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen --- -- 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 diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index a3cb069..fbbe85e 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -366,6 +366,8 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h, /* port group has changed. Update to new port group */ rcu_assign_pointer(h->pg, pg); } + if (sdev->synchronous_alua) + pg->flags |= ALUA_SYNC_STPG; alua_rtpg_queue(h->pg, sdev, NULL); spin_unlock(&h->pg_lock); diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index bbfbfd9..3408578 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -220,6 +220,8 @@ static struct { {"NAKAMICH", "MJ-5.16S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"NEC", "PD-1 ODX654P", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"NEC", "iStorage", NULL, BLIST_REPORTLUN2}, + {"NETAPP", "LUN C-Mode", NULL, BLIST_SYNC_ALUA}, + {"NETAPP", "INF-01-00", NULL, BLIST_SYNC_ALUA}, {"NRC", "MBR-7", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"NRC", "MBR-7.4", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM DRM-600", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 1f02e84..420239c 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -964,6 +964,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, if (*bflags & BLIST_NO_DIF) sdev->no_dif = 1; + if (*bflags & BLIST_SYNC_ALUA) + sdev->synchronous_alua = 1; + sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT; if (*bflags & BLIST_TRY_VPD_PAGES) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9173ab5a..4af2b24 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -176,6 +176,7 @@ struct scsi_device { unsigned no_dif:1; /* T10 PI (DIF) should be disabled */ unsigned broken_fua:1; /* Don't set FUA bit */ unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */ + unsigned synchronous_alua:1; /* Synchronous ALUA commands */ atomic_t disk_events_disable_depth; /* disable depth for disk events */ diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index 96e3f56..9f750cb 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -37,5 +37,6 @@ #define BLIST_TRY_VPD_PAGES 0x10000000 /* Attempt to read VPD pages */ #define BLIST_NO_RSOC 0x20000000 /* don't try to issue RSOC */ #define BLIST_MAX_1024 0x40000000 /* maximum 1024 sector cdb length */ +#define BLIST_SYNC_ALUA 0x80000000 /* Synchronous ALUA commands */ #endif