From patchwork Fri Jun 9 20:38:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Kelley X-Patchwork-Id: 691076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE4BEC7EE2E for ; Fri, 9 Jun 2023 20:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232201AbjFIUj3 (ORCPT ); Fri, 9 Jun 2023 16:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbjFIUj2 (ORCPT ); Fri, 9 Jun 2023 16:39:28 -0400 Received: from BN3PR00CU001.outbound.protection.outlook.com (mail-eastus2azon11020026.outbound.protection.outlook.com [52.101.56.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 364052D7C; Fri, 9 Jun 2023 13:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NAs20PerSiuKH/XLdXSJa3GUPV9dP0zO6OPbrLbcR2zDV1RX4JbAkogCeIQpPKy5l8PhbzexhCzl5Z0VieRxPVANW+Ezn8iYADiGkEagDJARSs1eI4CAjhsAOQB9qMPFbigG/EV7vgPNplKuJFsw1d20WeFnGF6PHXPJuEcYBv91znJqRS1H5MapsC5twd1+NC7w8LLj1+F7IoytS5rEWl4OqNmPdgNru521DYh2/OXRsASrWg22IfzrNLnM+UXNf/f/vqSAuvujSC0XMeDV8fe+cMTwvvJpbu8+J848Upjt4Ov8n2W2px160aE2+fKptg5P+Eolp1JMsG5+CdDwrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7jPMz2tVI/FMbDhYJZsqHAhq/VD4UANM+LOK/VxDiFc=; b=lC2KWW6D49lpwHsoYwVQA2IG2vst+jpkm8L9VIryT766VYoQpfM7+xaiTWVDu4d9+6pc8/btWVD/1oLuCqQyE62BQyXWjeJ9asixjsPiCjDF1TanpMOOTsLiCd45ndvQxyQQzr5IT/aRzLIjdp1TEAJyhC4SC6hEHET0DMlabou278GptLXZleatoCBnlgxUjPSDrtal04bFGu6ho7uA/KDpAM90GnJxKTrZ/0iNctctUpZi0KlMsZn0Dbz/Kg52pVjCC5QUvNlEb3mly/DEg3KzrWyVkKcxJZvo6OiNWPzESqOVolTJ9nD0UeoXE7SfygEJCrkp0H6EGOb1UuFT2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7jPMz2tVI/FMbDhYJZsqHAhq/VD4UANM+LOK/VxDiFc=; b=cfo5DGY7QFk9MKqi6+7t0PjcFw5h7E9Fv3itqYXLX3aet7w+5IuHHjFIXKjWRmTaK3QOkOlx0prT7Sl2UBq7O4Fgbqxj1NLbcdgSnl8x66bEs4oWJUYzMsX4mOquoAMCpn4wBl+Lk15NmxmWbmJ//w4I6E9wAozPZWFgxdM1pAc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) by MN0PR21MB3703.namprd21.prod.outlook.com (2603:10b6:208:3d2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.12; Fri, 9 Jun 2023 20:39:24 +0000 Received: from DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::b7e9:4da1:3c23:35f]) by DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::b7e9:4da1:3c23:35f%5]) with mapi id 15.20.6500.016; Fri, 9 Jun 2023 20:39:24 +0000 From: Michael Kelley To: kys@microsoft.com, martin.petersen@oracle.com, longli@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, jejb@linux.ibm.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Cc: mikelley@microsoft.com Subject: [PATCH 1/1] scsi: storvsc: Always set no_report_opcodes Date: Fri, 9 Jun 2023 13:38:21 -0700 Message-Id: <1686343101-18930-1-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-ClientProxiedBy: MW4PR03CA0148.namprd03.prod.outlook.com (2603:10b6:303:8c::33) To DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR21MB1370:EE_|MN0PR21MB3703:EE_ X-MS-Office365-Filtering-Correlation-Id: f205c07f-0083-446a-63e5-08db69299c7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1MDPSV2CBGX9HRpEsDMd6P/r6xej0G4FtFirGXtAqPOg1PvNzR0fi8cixze+gJqhhYfT04AB94jhbfq7fAbzuFmzHOBigAIQsM6vGvJX9rz6A1w6f1dF2MfXrYlnJCP0BzX6YfPiG+U0FKe4+XW7WeqsC7lbJZ1HBQl+dkFRr5kexJfFBvETNfJrVubHzt3w1r0qBE9rWolcvJDsbYmHosJhk5404YzTAWRY0P/w0NIvbeueT+myUPYB90RsTeEDHw911hzh620QvywTmR7k3lUzufPkpevfKTlVjogbUwUjR0FmDwgKGQ62ce4YqP58oKpRcJ06ylHrmfZw0K+v/JMLv40tVPtu9eI0/CYvwVjGhT0A0dphJWqhEdSaGJOyOSNtMwdMXHWRWd1nqJo8Jzpey9w4Ga6ZTW6wytEMRjQbbvxU38vqpQ7BwtzfODwZ7I9yV64BI3mcFJbfcvPFjjrnc5h7rowN6QyASciQFF6hH8VnCmifsX2A3rWlIaOsa9UvTaC99xaoGanCA6KgSEXr/RbDN3IpIMJCnynB/Rj0h22CRN/rDIAA+gLqqPq0okLEv8YKx/HHDprmjNrOC59J52H2p6ed/8DtfPoc8gfgQyp8tvddEdYTGLK9Pwv1nPSfpdyPVdqy/q1cEGl1hTOHNPQ2e2HiuWiN6e53J8A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR21MB1370.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(376002)(396003)(366004)(346002)(136003)(451199021)(10290500003)(66946007)(316002)(66556008)(107886003)(66476007)(478600001)(4326008)(36756003)(86362001)(83380400001)(6506007)(26005)(6512007)(186003)(8676002)(8936002)(2906002)(5660300002)(41300700001)(6666004)(52116002)(6486002)(82950400001)(82960400001)(2616005)(38100700002)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ADB8vGoJPDrZkTql1eSFuTegPPwMZnK+CS0A19qs2+hk73poBDNgfrMyZJjziVg1wbLf7zzIto+AU22Opb5EbFJwk2HmVZI2CfG3ac2x1UuS3f3baU1EZv/+1Eq9RGZAXZwCqaU05lzjc03rGX9NW4oxtR5bruYObVy77VGDXy4qgPtOhHmGLIiwWepRnhYeAsS/xbEVcFv/ZK/UtKOcbr0Slalw8NZkf1nGKpGY/dPKGn8pM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Tj3uJURJPc70yqld6OnNjmPhK4vyyn+qX7IUY7KIc+L49Zp4Lsr7uifA02wAIYYINpRKqXcCc64uicqcgpi9OY5uL5+lvLtMR+33O1mI+pkS5rmomeuQehQ9b91zM1h5ZXGMy0hcDpzEpKPMkEiTlkTrR7YLt76ddg8MAPQIt9YdZfY1eGN3fOwzHnSuCJgL9huqyuB/ZOigUv8MqJDNsBxrd2uTkcEWBNDENxdCwzJD60NF7pRsVNZhfv7yd7LaHWUnslyUtXeNeu5beWmQwCJhcgfXej6 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f205c07f-0083-446a-63e5-08db69299c7e X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2023 20:39:24.4302 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FAHWKXNT2cLY3EdfhLmckjjONHic6XmiLMZTmwhqTMfWOqKumfRBQaU5yxgHb7EdP0a2SmPVRMfw5rZjrpdTKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR21MB3703 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI command, so scsi_report_opcode() always fails, resulting in messages like this: hv_storvsc : tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001 The recently added support for command duration limits calls scsi_report_opcode() four times as each device comes online, which significantly increases the number of messages logged in a system with many disks. Fix the problem by always marking Hyper-V synthetic SCSI devices as not supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI command is not issued and no messages are logged. Signed-off-by: Michael Kelley --- drivers/scsi/storvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index e6bc622..659196a 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1567,6 +1567,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) { blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); + /* storvsc devices don't support MAINTENANCE_IN SCSI cmd */ + sdevice->no_report_opcodes = 1; sdevice->no_write_same = 1; /*