Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754162AbdCPVia (ORCPT ); Thu, 16 Mar 2017 17:38:30 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:49736 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbdCPVi0 (ORCPT ); Thu, 16 Mar 2017 17:38:26 -0400 X-IronPort-AV: E=Sophos;i="5.36,173,1486396800"; d="scan'208";a="99814243" 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-99bff7000000c960-b7-58cb0595edbe From: Bart Van Assche To: "linux-kernel@vger.kernel.org" , "hch@infradead.org" , "linux-block@vger.kernel.org" , "tom.leiming@gmail.com" , "axboe@fb.com" CC: "yizhan@redhat.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: AQHSnp1//GnMitOFz0u5mNGj3B7y4w== Date: Thu, 16 Mar 2017 21:37:23 +0000 Message-ID: <1489700230.2574.18.camel@sandisk.com> References: <1489064578-17305-1-git-send-email-tom.leiming@gmail.com> <1489064578-17305-3-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1489064578-17305-3-git-send-email-tom.leiming@gmail.com> 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: <9EAFB5814EF8CA4E95A3CB9D62052A07@sandisk.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWyRobxn+5U1tMRBrtmMVr833OMzeL0hEVM FntvaVtc3jWHzWLBxkeMFu9/XGe32HLlLpsDu8fE5nfsHjtn3WX32LxCy+P9vqtsHp83yQWw RnHZpKTmZJalFunbJXBlTPv9jK3gL1vFm28LGBsYz7F2MXJySAiYSEy/94exi5GLQ0hgCZPE xpurmSCcS4wSr57MYASpYhMwkpg9YQ8LSEJE4C+jxOTuG8wgCWaBBIlbex+BFQkLhEu8ar8B ZosIREi8//mfFcLWk7gzczU7iM0ioCqx+t10sF5eoKFXF19ng9jWxChx9QDEIE4BN4nTp2aC NTAKyEosnt7CBLFMXOLWk/lMEHcLSCzZc54ZwhaVePn4H9Q/ChKfV/xjg6jXk7gxdQqUbSXR POkpK4StLbFs4WuoIwQlTs58wjKBUWwWkhWzkLTPQtI+C0n7LCTtCxhZVzGKFScmF+empxYY mugVJ+alZBZn6yXn525iBEeqovEOxn8b3A8xCnAwKvHwZiw8FSHEmlhWXJl7iFGCg1lJhDf8 AVCINyWxsiq1KD++qDQntfgQozQHi5I4b8zsqRFCAumJJanZqakFqUUwWSYOTqkGxr6Gt8u7 NK42NF3U2V5QX73e0rRiSuWEGSvNF19rfLlaZU2ksZH4v+08pYI/GGtP/GD4NOute2Po4Tlr N7Qa+iX1GObnyHkoyQk6Gr2PX+LiLPxdszKq5uWUi7Krv+vf97w5rW1JvUS59aW1JYxXjhXs F3pVuTezrlnezLBlqWsHt7mnV5qKEktxRqKhFnNRcSIA3/LX2NACAAA= 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)(39850400002)(39840400002)(39860400002)(39410400002)(39450400003)(2980300002)(438002)(199003)(24454002)(377424004)(189002)(9170700003)(54906002)(356003)(6116002)(305945005)(81166006)(50986999)(8676002)(102836003)(3846002)(54356999)(2900100001)(229853002)(76176999)(103116003)(23756003)(8936002)(53936002)(86362001)(50466002)(2201001)(7736002)(33646002)(36756003)(2906002)(106466001)(47776003)(2950100002)(2501003)(38730400002)(6246003)(4326008)(39060400002)(189998001)(8746002)(5660300001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR04MB2241;H:sacsmgep14.sandisk.com;FPR:;SPF:Pass;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3NAM04FT009;1:MUEryxooWT5s188j5Ktcdj5XSHYQvktJbWX7sZja6g0pOrLaaSlxKyH3Nj5Kzwjtp8AbSKi+GltDWskQ3LCex0RQ52VPWFbHBup1lt60WiLvCY8WIiQ3+xlqXYSOZcibtvvHQQXTaXqCTUc55ec69AMvdbJwm6j6ENc8ErAav/ZKppoqZdbqenxxZV0E/8uCaPjSOIGtMovzXS/gpqZR+8y9sSyAty9fxHo0iLFdkpwDsGOwp4oUtyua8snoZ6ic0YipHUqLtPSoRQsrOp/EZoO+lAomFWJ/kTha+g9ntVr7WbJqmBtf3trPi2gN/InrM9XQm/Zh6gNzLlKFXZKFn1SMZLNq1dNBSH8e6WyaaTZrbjB694bemC8W6czK4MZckDgLv9uQjm7oPofpFjKOMTpy+wxojRyDid575N+WxA9MQqa7aNKHv8gTJ+wh1ZpamJ1NM68bolQOBkCwShHdDI4Zm/hXnLdJH+qhuK/L+Xl8XdxZs5jqLm27RjlJjoN73J0E6Rj/FBflgxcN2QU6A8RlsyYKGMqeWoUCetD3ONBQ0O5o1ItFuwq3jVpqZlee X-MS-Office365-Filtering-Correlation-Id: b7ad0b07-eb45-45f4-a919-08d46cb4a63f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254038);SRVR:BN3PR04MB2241; X-Microsoft-Exchange-Diagnostics: 1;BN3PR04MB2241;3:EMpvXSoKv1DuXbFRoCWvXvkKc+vuK5y9RYO269Cns3A0g9EcLzH2lw6NH5iYIEI7OkUYlZZTTkku+LQM4KeBh/lfXpOgGG/twOml/1ErIDKykqaSme8YVKSjCr6uuTFKKtsH8zpiwwf3wTDG75Z2qnj8jOkA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B3ueONwYhkWZOQ+eyvdXq5q7xRq/BKmuVwcLJ9F4Ag6PjO4MEwxCq0tzh/EMR6EHw4l4R3jyYrbvOqbco2ab+V00q6W/bIq9YJSTw/PGjd8JQigiiD5Qb0gMJ5ltxm6vgUeBFwnCYYn2HKuRjR+pzE120sWvty7peGXqDOEVrTkYd79KMrKN+5DVYRfXNS5cSC21VtoWEsX/HEzg5mq5ERVNLPfQGjFZV/E4hfmF3bc6Lm+By9PjKYwCTjCJNnrzpShq3i+JqpfrcMAxeJtFf1W8aeiGhzTU3CGL9c2DtMarGCV4G48NOD/jMSQW0knNVuQaQb5OUpDFjuJnxblsxW9JovUbaRJeFxzuXEp33y+QuIgTuzY18aRc+ofuvBD1yUEIWQFqfn4AcJPtVbNNtc6cZ/67NLP14eN470bbkQ6ZuIQjFM+ch0dG3gA4975j WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(13018025)(13016025)(5005006)(13024025)(8121501046)(13023025)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558025)(6072148);SRVR:BN3PR04MB2241;BCL:0;PCL:0;RULEID:;SRVR:BN3PR04MB2241; X-Microsoft-Exchange-Diagnostics: 1;BN3PR04MB2241;4:PDL/8hy2xCtojltTNnFjFsVrxHtlmF/DDijwsRTEFo+zQI1Bj4OrTFn4O/mRodpPL/fSwtX2JXoeP/8Zv9HXiP1kVQ+71v6cdOfc17o4+uQvK2Pv0IXx50Y1+u1CvM/m2Pe/G+qUZsAXHgtkVZsSh0YMlv+8nzxFKbwqkNC0KkeiEWYxUfcJGsb4rX1eoRB/fmD1yy5tqIT9O/xFUkvzHh8lGcx18zF8XbpM7HW9J8LTzumgpUdkJIS0Q9tXHDZhxSoEFu8d7AIZwTJT1mjBjN1Hb62QzjpkkkjLpP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SbuhgIcxdqNRDPpnq7s4oc0zYL9ZjF464huMF521Js2hgN63NeoIZAarkQI0LcJ1RQw1PkTCgf2tzTad8YNXG2F57Yaj1wqoRgY3ZuTq6cRYd1wKXnr/A8P8tQAwra6StgYlsvIe7PIoU8XRBlHI= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2017 21:37:29.8154 (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: BN3PR04MB2241 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 v2GLceB7028222 Content-Length: 855 Lines: 26 On Thu, 2017-03-09 at 21:02 +0800, Ming Lei wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 159187a28d66..0aff380099d5 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -697,17 +697,8 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx, > { > struct blk_mq_timeout_data *data = priv; > > - if (!test_bit(REQ_ATOM_STARTED, &rq->atomic_flags)) { > - /* > - * If a request wasn't started before the queue was > - * marked dying, kill it here or it'll go unnoticed. > - */ > - if (unlikely(blk_queue_dying(rq->q))) { > - rq->errors = -EIO; > - blk_mq_end_request(rq, rq->errors); > - } > + if (!test_bit(REQ_ATOM_STARTED, &rq->atomic_flags)) > return; > - } > > if (time_after_eq(jiffies, rq->deadline)) { > if (!blk_mark_rq_complete(rq)) Reviewed-by: Bart Van Assche