Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754165AbdCPVgT (ORCPT ); Thu, 16 Mar 2017 17:36:19 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:58195 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbdCPVgO (ORCPT ); Thu, 16 Mar 2017 17:36:14 -0400 X-IronPort-AV: E=Sophos;i="5.36,173,1486396800"; d="scan'208";a="3880417" Authentication-Results: spf=pass (sender IP is 74.221.232.54) smtp.mailfrom=sandisk.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=sandisk.com; X-AuditID: ac1c2133-9afff7000000c960-91-58cb053b4ffa From: Bart Van Assche To: "tom.leiming@gmail.com" CC: "linux-kernel@vger.kernel.org" , "hch@infradead.org" , "linux-block@vger.kernel.org" , "yizhan@redhat.com" , "axboe@fb.com" , "stable@vger.kernel.org" Subject: Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Thread-Topic: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Thread-Index: AQHSnp1KEX2eoVjOJEqb7jYtuzuSHw== Date: Thu, 16 Mar 2017 21:35:54 +0000 Message-ID: <1489700141.2574.16.camel@sandisk.com> References: <1489064578-17305-1-git-send-email-tom.leiming@gmail.com> <1489064578-17305-3-git-send-email-tom.leiming@gmail.com> <1489536441.2676.21.camel@sandisk.com> <20170315121851.GA15807@ming.t460p> <20170315124024.GA16549@ming.t460p> <1489592177.2660.1.camel@sandisk.com> <20170315162158.GA18768@ming.t460p> <1489613678.2660.9.camel@sandisk.com> <20170316000747.GA19948@ming.t460p> In-Reply-To: <20170316000747.GA19948@ming.t460p> Accept-Language: en-US, nl-NL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] Content-Type: text/plain; charset="iso-8859-1" Content-ID: <09837B2A65CE7342B748EEF6B35EEACF@sandisk.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWyRobxn64N6+kIg6fHGS3+7znGZnF6wiIm i723tC0u75rDZrFg4yNGi/c/rrNbbLlyl82B3WNi8zt2j52z7rJ7bF6h5fF+31U2j8+b5AJY o7hsUlJzMstSi/TtErgyflxsYi64zlpx9/5f5gbGPSxdjJwcEgImEof/rWfuYuTiEBJYwiTx 4M8pVgjnGKPEkskrWUGq2ASMJGZPgOgQETCW+PT6GSNIEbPAKiaJG78bwYqEBcIlXrXfYIQo ipB4//M/K4StJ3F7z0ewOIuAqsTliVfBBvECDV21tpEdYttEZon+o7/YQRKcAgYS087PBbMZ BWQlFk9vYQKxmQXEJW49mc8EcbeAxJI955khbFGJl4//sULYChKfV/xjg6jXk7gxdQqUbSWx Yv4SqDnaEssWvmaGOEJQ4uTMJywTGMVmIVkxC0n7LCTts5C0z0LSvoCRdRWjWHFicnFuemqB oYlecWJeSmZxtl5yfu4mRnCkKhrvYPy3wf0QowAHoxIPb8bCUxFCrIllxZW5hxglOJiVRHjD HwCFeFMSK6tSi/Lji0pzUosPMUpzsCiJ88bMnhohJJCeWJKanZpakFoEk2Xi4JRqYNyZO5ln S1pP8/Uk7h+cppVSbSV72R5etnqTEtOYN9HvU/R6k6tHJm/ZNSsnfVUv3wO9i5139kZPWrJs 1SaO/PSd96ZHczsxcG/mbhXYfTQ2rdPik7/luX034nSWrjL7ZP91nfGEPkv5CcdP376Sn/nQ fIZPpapkI6/QpyVyB5vn+3kdUZiuIaLEUpyRaKjFXFScCAAbt2mE0AIAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39850400002)(39450400003)(39860400002)(39840400002)(2980300002)(438002)(377424004)(189002)(24454002)(199003)(9170700003)(8936002)(54906002)(2351001)(23756003)(50466002)(7736002)(8746002)(81166006)(356003)(2950100002)(6916009)(106466001)(229853002)(93886004)(5250100002)(5660300001)(2501003)(86362001)(4326008)(110136004)(103116003)(47776003)(5640700003)(2906002)(33646002)(76176999)(2900100001)(38730400002)(39060400002)(54356999)(3846002)(6116002)(50986999)(8676002)(102836003)(189998001)(53936002)(6246003)(305945005)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR04MB526;H:sacsmgep14.sandisk.com;FPR:;SPF:Pass;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3NAM04FT012;1:SGF9D+tkZx5ZDLFkwcgE2wJG8teKsi8UyKvgNTVPg2/aoBvKAylOTTnc4OygCFNDVp7gyTkZj4Kok8mTp2cS8OVIvf6vq3LsbZwURlmuDopNPXgrQWjyo6bf/lEqhxS7IBtYq2hSUIbUvGlNQvB8H+V3oDZZBQ5VdWX6NNQ1BBRC5bOii6XnzsC1l7+GOOFfvb2UlIG+zKjmLZbcP4txJZc6yKL702LgtR+bRX1RB0wrCEk8aPoa8BHv7J+fCKsJv4JXnfbpnLOjE1NfHdLQSj9A+ZJNozEP4QZm4G+SOCEzg0unJxJrQ7Vnhch/ww+QDY2xhLfryRx9vCcM/EMuVJhKI7kUzaBGVCpbzCTOJKlOw3I6pJx9HpjSo/Pd5uowgSqL5+F2p4yI1nTR91VDL9kHPQ3qG1LTt+Jm1wnJMLY+wNVNpqFSqIu6vaMg8O6RF6F2eUSOo9ftPI1ipq00LDlViPesf93VE35/cc3pAspVSXuqzBAR4tZoYS2zjAhe0ABnCZBLl4CGwKn0k++ohA== X-MS-Office365-Filtering-Correlation-Id: ce1b9ed8-d5ab-47e6-b884-08d46cb476da X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:DM2PR04MB526; X-Microsoft-Exchange-Diagnostics: 1;DM2PR04MB526;3:g2FO7J7T5UBntbuNJSFlXrW/G0EB/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jURPk2y6HVM9cqNnomwj4ZNPctID93wRpWFfd8Um37dKWcA0eKl0wSLIjQhp8hmxs4iIAZJ5FXJtaIFQ==;20:k8H+kIBsiB2oEQQMuBwgQeHF+AEzyk7+fCdax0qTlcKWi3XIriXxpWGPd1XXqRQj0VCTLa7kBvhRoaMD0wMbHeYUSMELZX4StTakIjIWkymsIyxFD2yHNBbpGcE/k1KV2VDXQbhEX0OGF6owGpb+Q8q6HYRsGg1nHLjcSmLuNbT6RYfYliRyyRFQ6HraeCYNWjjVdRUQyA5hQQdCnmmLi3s7eVoFkVM2Yy5K/smB+1PEi0B/N1X9u5sRfQoHyRtCYbGOwGPbmlWHpg6ylslVTDPb+azJKaMH49qhJtB3/8sIcRQ6SEgpCiUrH4/A929pdvF1XkAapqYjGImT+FPQ+FlnBXsh7b86OtS4Z4Q649FuhvA1eP5KRO6hMkqj84phLZJX0N92YYcbA5fXfdZ7HVKuj630TnbOVVXHZo98EpEjLfLjQoq41Drs5ipWVjMu2856MaiCnnnwArrE+3crBjHoXuK0AXLyQ9RR1jQraxqddSPUmEZqH7RtJQDG8zR0 WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(13018025)(13023025)(13024025)(13016025)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(20161123558025)(6072148);SRVR:DM2PR04MB526;BCL:0;PCL:0;RULEID:;SRVR:DM2PR04MB526; X-Microsoft-Exchange-Diagnostics: 1;DM2PR04MB526;4:QM7vsNO1FCxz07rGT5VIiexNo5jtwFZWQg+3RJvKJeQThjNhA8Lyl/pYoXLNXQcHePTm4luK5Rqk+d7Ntfq/3+8N2G3ctwFSUEpwRVmsfdXZAy+uY70cNWAehuduSoEbFnimW7+jQgOooz/U7T0DJh9YVjyCNUb8WTUZ2Do0R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HRfO/V5T/?= =?iso-8859-1?Q?JvFmsfKQOWI3Nw73puwunHXeL87hts/mZu+FHXw7ANPrll42GIAxfT2Q4/?= =?iso-8859-1?Q?vC1/bz+uC1eEyQIYDNtGClgDagvVOpH9hmf2i0bAlpCQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR04MB526;6:pZz9OlVtqFtxPIsNQzCX/zn/ssCRHaZIcJ0MFB9txpiJ+gSC9L8gPUKSIzWH7KCRWcI8SjHH9LtN8zLoH0KSjrjKLNESUelyKL+wDB0FgdSXYiePunF2DSS1gbEXrSX26qCJijYmzf2/k4OP0qULT8hPt8nloUt4wwXBvmGCTmUXkB1h3QmUfzJtAXz2S0FTaBxZF06Qz74TQln96k/pGMuxz4h+2gXmgBWorz6qPHVo2DhOMFgGCFk1KyRyTXvDFFkb6iri+TZe6huKfxf1t2gxVy9va5jJnPHhYR/kuLK8IgZAwC08T8/feYwmxirg8pBfTWnEo5JWwWEEbleQsnEkAgvnPCr/wPAxQd3P6QYyixXbew0I8wYmpG/H8AXaG6Tgq2QOx6a3lad87w2yceXyAas12cx7DurnhsorAEY=;5:1DESL1WiMeNMHTSaWjqe/mN8IShzE3VGdtIKJtwfH/2b9X/eYvc/o2Mp5whDO3oTA3/ymwESALR8vK6BrCn9Rj40XbBu0EAZyfhgJN03PUMejS8co052le1Kemds6JdHlpfY39X3vtzNw8bYY22feA==;24:RxmvSCDujoV8pmqYiknAkVc0wijxjhALteo621h0AuxaU5x/Y/DD3gzlTyVhdOl3UrxrL7HQbld5Ds9LGzEUepBEK8AouKHctqSq+ETfwZs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR04MB526;7:Bhr0u8yQVkCOnYMHCvFJBExl1JSllZ16bM8JuRVCBUvu4D+l4xkW1/MvryIPnAaUOYpIdnKFJPnEAVmcIug4GOW3UUhTq/FINEAXQTa2rQmohs3qVIMKt8YejBdCFiHBSZMZnJU9LIztM0PA4Vt59RpV2c7zU0eSyAqHhrarOg5ZYdUMRi6IrkjMFT8/QbYzeJfsE4lOUkjFB4/6iKlv5H5/Q8QrbrnX+JgZvNbpVjgYuTWUDuK7nasiEC0hNX4HPLwxGNrcalZEazQ2ogSEAZc25+gwUtjAyp00HzTuQjkP/t/tR4aoK7mAOQFbpgkdSi3ZcAZ8+lKsfW76zGVbWg==;20:XDh4OCmnwgyybbIL7cBtvE+gsCYXUXR+k2ntuyKogzptH0chL4yHXyH7HsxfV7OGwCqUwXi1Iv2+XhRzqcdbkTjkbCpnv7CC1qdaRGRpsAOKpn46c0b5gOpreE50ykvA/Gavtf3E1Z7ixbtUU5FjkHxsfqECWG5F+ZAoef4zXoA= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2017 21:36:10.3165 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86;Ip=[74.221.232.54];Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR04MB526 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2GLb2fV028033 Content-Length: 695 Lines: 18 On Thu, 2017-03-16 at 08:07 +0800, Ming Lei wrote: > > * Check whether REQ_ATOM_STARTED has been set. > > * Check whether REQ_ATOM_COMPLETE has not yet been set. > > * If both conditions have been met, set REQ_ATOM_COMPLETE. > > > > I don't think there is another solution than using a single state variable to > > represent the REQ_ATOM_STARTED and REQ_ATOM_COMPLETE states instead of two > > independent bits. How about the patch below? > > I would review it if you can confirm me that it is a real issue, :-) Hello Ming, I was chasing a v4.11 regression in the SCSI stack. Since my tests of today revealed that it's probably not a block layer issue, let's proceed with your patch. Bart.