Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp763383pxb; Wed, 3 Feb 2021 17:56:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM6iZHO+Qzs9D2DRUiGDWVfjQl5FT0eM8/xL9RZiC5Xpuk0YHlaQjSnEOV3cP1JIAuTQXt X-Received: by 2002:a05:6402:1655:: with SMTP id s21mr5824485edx.171.1612403811702; Wed, 03 Feb 2021 17:56:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612403811; cv=none; d=google.com; s=arc-20160816; b=D6vbFPtD3UYv+lMRE8ErizIPDyFF/ArVtEAuut+BJ9vPng5CQYfECBrUTpoDld7FKv BBTYMYqNyU8y/jADbCniHt0vXkoARgA0k4Ebx/RxvbwSXmJsZ7cA0fzzZ+bsPOrFKhlG uisTsmzvHv8xBHHA43nYCAFku76Oe1uf8NMBvA+fpLxbjS/jB0CgA/23mvQy7yT4vL+5 vBHd7h7TdN7DUlqvS3BFi7SDaaopAMojyp4qKmvYkkkWG9WWxxsm9GHlIrEZJzt0RDt0 9mZawSRpAcbLyPIUnxrt+skW9hOOHZ2b6NsszM+CE5tuk6++gOBQ3VR4ukiebYyRY888 Rpwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=keB1j2Pbis/s0ZGb1uliJTRuloabeMV3aFkUmRHTx6I=; b=hI1UGV/y82Ha5Hjdy+Wh4+8MkyrMGsSXqHrKsC0YYDAqFYBxf/83hud3GFGeEXwPCB Ih+GJLd+kxZSkp89z8IiRIIil6lfGaldXrJNa4qg2huECS8BhUWgfyQnGWayaEjF0Gtd jdWCvd8iP9GQWv1INfNnXBtrtWWaGuKAESIdVFW3HqjXakB2KbVvmJX28Y/sSftyjGdk bz+jkzVeponSRplc7cMF7HHgTe2OdkicJjxJC7ndqL/hWH+ScUHTa3+QjpQNTaIObEdr fSeaYp0NNBI11H82pX7mghJwp3Z1Hc3CSghQ6UqVdf9d5P5Uqslc8Ucfx4TsBuxnPm5h 4yPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=f9sJHLTQ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=PdBsJtD7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si2374923edt.415.2021.02.03.17.56.27; Wed, 03 Feb 2021 17:56:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=f9sJHLTQ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=PdBsJtD7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbhBCV3g (ORCPT + 99 others); Wed, 3 Feb 2021 16:29:36 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45435 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbhBCV3f (ORCPT ); Wed, 3 Feb 2021 16:29:35 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7DDC55C0170; Wed, 3 Feb 2021 16:28:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 03 Feb 2021 16:28:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=keB1j2Pbis/s0ZGb1uliJTRuloa beMV3aFkUmRHTx6I=; b=f9sJHLTQsvYdKWVXToj0/4RbrlCNlra42qMMoQGbImb /pMV/GHoME07sfmCfT0to1vig9gwUMoq5EtREO7waxbzCu2E1i3QlupXf5qJdfds shoPCppiLIR4cprJYxpVO9z1AbGmiFd+L6VH/Za4P8e/hqjcPbX0kciujezVS1iy SkigiqGH9yAV7LheErB50n4H4AvrQA+PP5qd4iW63sImx0Nw2SRBW8ZnTMkCDTe5 UnmNNYVdYwvw8YPMGRiyZ9Ojir61kjCahwRWklOBJXBG7nKtFlrAbi+zyCLbuhXF Igc+nAQMdMFzm5DcF2XJ+ZvAySZMogt2sJ2DeWuBVwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=keB1j2 Pbis/s0ZGb1uliJTRuloabeMV3aFkUmRHTx6I=; b=PdBsJtD7quXtnpYdrPDudq IUOhI+cNC2JzLcHjVWY/gNH/J5fFz1SMv3f/Ens7mpor7NkZLFL2Esu88gFcSk1+ UcRqwgdROl2/fKirMdm/VrBEqIb13keqiw6hb2jJLceeexQRRb9h3/TMH9pCyzj4 L1YqVcHrZtBnnm4rewwIgG147lm7wr5VdWvEsnn5vnZ2vPgeyFygZmbYA1z6Pp0a 7yAcP1lcLW2IanKAMeZdVIMlSzEOsK9fUgV9FGCvA9YSm6ELpx+08OwSalcNcVBT MzfYa0a2LOQYwODDQkQ8trtaadbG+6J0Fi2oPTERAIoIngnMGD647jKWuchdWDTA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedvgddugeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucfkphepieejrdduiedtrddvudejrddvhedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id E450C108005C; Wed, 3 Feb 2021 16:28:27 -0500 (EST) Date: Wed, 3 Feb 2021 13:28:26 -0800 From: Andres Freund To: Greg Kroah-Hartman Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bijan Mottahedeh , Sasha Levin Subject: Re: [PATCH 5.4 103/142] Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT" Message-ID: <20210203212826.6esa5orgnworwel6@alap3.anarazel.de> References: <20200601174037.904070960@linuxfoundation.org> <20200601174048.647302799@linuxfoundation.org> <20210203123729.3pfsakawrkoh6qpu@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2021-02-03 14:03:09 +0100, Greg Kroah-Hartman wrote: > > On v5.4.43-101-gbba91cdba612 this fails with > > fio: io_u error on file /mnt/t2/test.0.0: Input/output error: write offset=0, buflen=4096 > > fio: pid=734, err=5/file:io_u.c:1834, func=io_u error, error=Input/output error > > > > whereas previously it worked. libaio still works... > > > > I haven't checked which major kernel version fixed this again, but I did > > verify that it's still broken in 5.4.94 and that 5.10.9 works. > > > > I would suspect it's > > > > commit 4503b7676a2e0abe69c2f2c0d8b03aec53f2f048 > > Author: Jens Axboe > > Date: 2020-06-01 10:00:27 -0600 > > > > io_uring: catch -EIO from buffered issue request failure > > > > -EIO bubbles up like -EAGAIN if we fail to allocate a request at the > > lower level. Play it safe and treat it like -EAGAIN in terms of sync > > retry, to avoid passing back an errant -EIO. > > > > Catch some of these early for block based file, as non-mq devices > > generally do not support NOWAIT. That saves us some overhead by > > not first trying, then retrying from async context. We can go straight > > to async punt instead. > > > > Signed-off-by: Jens Axboe > > > > > > which isn't in stable/linux-5.4.y > > Can you test that if the above commit is added, all works well again? It doesn't apply cleanly, I'll try to resolve the conflict. However, I assume that the revert was for a concrete reason - but I can't quite figure out what b0beb28097fa04177b3769f4bb7a0d0d9c4ae76e was concretely solving, and whether reverting the revert in 5.4 would re-introduce a different problem. commit b0beb28097fa04177b3769f4bb7a0d0d9c4ae76e (tag: block-5.7-2020-05-29, linux-block/block-5.7) Author: Jens Axboe Date: 2020-05-28 13:19:29 -0600 Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT" This reverts commit c58c1f83436b501d45d4050fd1296d71a9760bcb. io_uring does do the right thing for this case, and we're still returning -EAGAIN to userspace for the cases we don't support. Revert this change to avoid doing endless spins of resubmits. Cc: stable@vger.kernel.org # v5.6 Reported-by: Bijan Mottahedeh Signed-off-by: Jens Axboe I suspect it just wasn't aimed at 5.4, and that's that, but I'm not sure. In which case presumably reverting bba91cdba612fbce4f8575c5d94d2b146fb83ea3 would be the right fix, not backporting 4503b7676a2e0abe69c2f2c0d8b03aec53f2f048 et al. Greetings, Andres Freund