From patchwork Fri Aug 12 19:08:21 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: 9277877 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 BC48E60231 for ; Fri, 12 Aug 2016 19:12:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC3E128ADA for ; Fri, 12 Aug 2016 19:12:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F69A28ADC; Fri, 12 Aug 2016 19:12:25 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADF8028ADA for ; Fri, 12 Aug 2016 19:12:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7CJ8YN8035708; Fri, 12 Aug 2016 15:08:35 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u7CJ8XFE016574 for ; Fri, 12 Aug 2016 15:08:33 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7CJ8XpH027365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 12 Aug 2016 15:08:33 -0400 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E8E9796EA for ; Fri, 12 Aug 2016 19:08:24 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id o80so4560220wme.0 for ; Fri, 12 Aug 2016 12:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:cc:message-id:date:mime-version :content-transfer-encoding; bh=sM44SjJGGltmvXPgxXpCPTQIpUwEnyxh3tsmV7120KY=; b=Z2oAM5FFID2dAlbZGwKGnA6Fx+2GaNbkZaEP1qwnAsItNCbzXTkpK6a51JuTJZl6Rm rsh+cZphADeG+XIj7Q+1AxZuJp7XiDDDMi5a6sTn6ceUFIqdFDK7BBH9TApfamb52my9 rgeHKJgAfwAFVge5Db+cHTENOJWUO6hR9YBTXgvLXZqGi7OyImkneJRndQLRPmHrZRzL 66w++OOMawQvtuJLNobG8FdpLS3JI3lv4ywXWnBqiS0PmPqyEIfsrn6kAfYZsJN+Y/p7 y/h2JcMOxAikqPkxVvrGDrNL8bGlL8Kss6W/QdGJ5dfToty8FMWktd6JSUe9kSAbIVWM /7eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:cc:message-id:date:mime-version :content-transfer-encoding; bh=sM44SjJGGltmvXPgxXpCPTQIpUwEnyxh3tsmV7120KY=; b=UrTn5LuI6DO4vgma9pWZYa/vguyZMJ4o7BL7HmgkmEOVDWC9jOlW7oVH0Vz0piK14M gpbS1P04K7uVohVPBRHlFvS4/Ur1rpMa+Li9vlThexC1niZ7ddCH1qHDn10wp+OF4Dfu 8iED+RmlMs35CZSj4pYML4+xlQDP2kJscgn2umTNExUh6xoeje4ROupAvQUxYk7GUbjE h4kPJ8TevmhAcDd4S4guDFxfdlPsT8U3FZsE4BlLf9lqYBfPSKRCkLa6DDgDFgJgAZ6S ebTLEYfNzJ+zszx5Qu3n1rFPvPGEB8qL9Rl+AgW6ChTcZaG35B3iB7M/t7y5498tYVCt u6jw== X-Gm-Message-State: AEkoouuseAF5kSnoQym3hVRYKmxqtjuX2C86f7wTbAiFcbn7ptw50grDGyckafZZRXwrSQ== X-Received: by 10.28.1.23 with SMTP id 23mr460312wmb.22.1471028903242; Fri, 12 Aug 2016 12:08:23 -0700 (PDT) Received: from localhost ([31.221.181.22]) by smtp.gmail.com with ESMTPSA id z18sm3787285wmz.6.2016.08.12.12.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Aug 2016 12:08:22 -0700 (PDT) To: Hannes Reinecke , Sean Stewart From: Xose Vazquez Perez Message-ID: Date: Fri, 12 Aug 2016 21:08:21 +0200 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 12 Aug 2016 19:08:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 12 Aug 2016 19:08:24 +0000 (UTC) for IP:'74.125.82.67' DOMAIN:'mail-wm0-f67.google.com' HELO:'mail-wm0-f67.google.com' FROM:'xose.vazquez@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.02 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.67 mail-wm0-f67.google.com 74.125.82.67 mail-wm0-f67.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-loop: dm-devel@redhat.com Cc: device-mapper development Subject: Re: [dm-devel] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP Hi Hannes, Why only NETAPP/INF-01-00 was included? 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 ---end--- --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel 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