From patchwork Tue Feb 28 01:19:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 9594533 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 EE1E160429 for ; Tue, 28 Feb 2017 01:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E090D2849F for ; Tue, 28 Feb 2017 01:20:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4BFF284D3; Tue, 28 Feb 2017 01:20:30 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 52C5E2849F for ; Tue, 28 Feb 2017 01:20:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbdB1BUT (ORCPT ); Mon, 27 Feb 2017 20:20:19 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:33208 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbdB1BUS (ORCPT ); Mon, 27 Feb 2017 20:20:18 -0500 Received: by mail-pg0-f54.google.com with SMTP id 25so21521354pgy.0 for ; Mon, 27 Feb 2017 17:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bJvTr072dZjMdY65C4XlFZOn4I35pjQEzsvUizgJpMM=; b=fjZxGeMs9EiMuVfSMEOOa51jW8YR+L1NHkJ0wvJ99xOnUrxqn8xTmXxLK8YXxsdhWU H8mCit8WVMT2LLRbVoan2eyr3HEZPfD7q6N6k/I0slC+bOZnCMTK1uesQn/UrvR7vYI8 s4FJc50GsOKsubbT2iR+w5A2qz8pUxtz0oX7Tl4KkhY6x0AiTfZilQCEyTRMNHIJJWLe SqFQz6FmZd/bLw1W9RwH3aUzbkaV7IhggCtGecANl7HLJa6wk03sA5+zvAH4RnyK9K+6 Qs1S7VRG33UrvN7B125AbwQmUNvkeQM2hCdr8E1Xi6KTzjF1ZYRu0/KasqEhUf8tfYNs o8Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bJvTr072dZjMdY65C4XlFZOn4I35pjQEzsvUizgJpMM=; b=hP8sDO5vEwMdwBzMORNsSwRC9lzc88vKJJ5Waq5nmuUXHDm3RdEKIvVXUKVSqqOtpW Njopy5MNtNPwkbshW4dFHgez/NOEa65FEFxDfkS6HIRIbZco3Mbhc2zuUi652PqSCUmg Ubf1JiMe+tT4MfUq8xyG2RrUejGhds+NZLkqa6Ofd4SoqZZ2qP/1ZuWXHBdTmgrIrsXC 1pglu6EE4iin0GhKLlSWIeljWjm4Hc5MIhthRjwcTNlbWghwCrGQI3TUbPwvWo0pSLfj 2MmNbB0ssrSlmmq411eQ2lvf1NJ51BE1/cgDFlmbNQwIfFvER4fw8B4hb8DoekJIndCX yOag== X-Gm-Message-State: AMke39m3ExMd1TtFZi6gHzlYnyv+zgh7RjfcECdjGtrAHyiMrwpTIPhLFdAPhMGBhFh7zw== X-Received: by 10.98.101.71 with SMTP id z68mr24302740pfb.25.1488244778714; Mon, 27 Feb 2017 17:19:38 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id z7sm97747pfz.128.2017.02.27.17.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2017 17:19:38 -0800 (PST) Date: Mon, 27 Feb 2017 17:19:31 -0800 From: Stephen Hemminger To: Christoph Hellwig , Linus Torvalds , "James E.J. Bottomley" , "Martin K. Petersen" , "K. Y. Srinivasan" , Dexuan Cui , Jens Axboe , "Long Li" , "Josh Poulson" , v-adsuho@microsoft.com Cc: linux-scsi@vger.kernel.org Subject: Re: SCSI regression in 4.11 Message-ID: <20170227171931.30b9f619@xeon-e3> In-Reply-To: <20170227152955.1362aabb@xeon-e3> References: <20170227152955.1362aabb@xeon-e3> 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 On Mon, 27 Feb 2017 15:30:30 -0800 Stephen Hemminger wrote: > Something in SCSI in 4.11 broke booting on Hyper-V Generation 2 VM with 8 VCPU and 4G of memory. > Both Linus's current tree (4.11 pre-rc1) and linux-next fail in a similar manner. It looks like some error > in SCSI device detection because there is only a single device. > > The offending commit causing the regression is: > > $ git bisect bad > e9c787e65c0c36529745be47d490d998b4b6e589 is the first bad commit > commit e9c787e65c0c36529745be47d490d998b4b6e589 > Author: Christoph Hellwig > Date: Mon Jan 2 21:55:26 2017 +0300 > > scsi: allocate scsi_cmnd structures as part of struct request > > Rely on the new block layer functionality to allocate additional driver > specific data behind struct request instead of implementing it in SCSI > itѕelf. > > Signed-off-by: Christoph Hellwig > Acked-by: Martin K. Petersen > Reviewed-by: Hannes Reinecke > Signed-off-by: Jens Axboe > > :040000 040000 6ff016fcdae227efeb19c1c301b17ccd7ea35da6 70d79f99d9b79ecf4dccbe067fc697219f5c78da M drivers > :040000 040000 a672ff52df8b2c211b3f98cae4a88d8a96ccde0b 1aaaed7de0994f597c7f8290c722a0b4a7789429 M include > > I checked and tree is current and up to date and includes > commit ee5242360424b9b967454e9183767323d10cf985 > Author: Christoph Hellwig > Date: Tue Feb 21 10:04:55 2017 +0100 > > scsi: zero per-cmd driver data before each I/O > > Kernel config is attached. It started with Ubuntu config, but then did localmodconfig and pruned > out unnecessary stuff. > This problem I am seeing looks like the one addressed by: Fixes: ee5242360424 ("scsi: zero per-cmd driver data before each I/O") but that is already in linux-next. Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either... diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ba2286652ff6..7e0463e78ff4 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1850,7 +1850,7 @@ static int scsi_mq_prep_fn(struct request *req) /* zero out the cmd, except for the embedded scsi_request */ memset((char *)cmd + sizeof(cmd->req), 0, - sizeof(*cmd) - sizeof(cmd->req)); + sizeof(*cmd) - sizeof(cmd->req) + sdev->host->hostt->cmd_size); req->special = cmd;