Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp245189pxb; Wed, 3 Feb 2021 04:40:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5dDYqEhXQvXtDvmehGGl3cr+Myu9mTQH2gJKG9XYT2iIUoG7f028m+1QReRFL8hZkUl62 X-Received: by 2002:a17:906:fc5:: with SMTP id c5mr2887044ejk.538.1612356034219; Wed, 03 Feb 2021 04:40:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612356034; cv=none; d=google.com; s=arc-20160816; b=io3sjcHY6xDxfC4tkUssYpMzptrWvVxp0xuJJZSHJ5QiLsVzhwSMsXrqkBPSKpzFlk q7/tblIIFUvPoDSJoJ2BSMxsdnHNlxLwrhMPTLE+Bo7GrIWKJw+szFLtxo6HUtmaZjlw 5JpdPGpHwRaoewTxRwPEd/LAfGLn7IS3LxHVMGtsl6t9a7zoh4xcqT0iZvrNIvXqukIs h7JkNv5aZKBpF9FKoNcxW6E17FaSt6n8YVXomWPthaYG4WcQGGBa2LjthhX7g1Nmh6AE gGliz6fCDp+NmvrYAICSluOdBMJtFvULx41xzrP7LuxVuy//taceeY+HjJuYmH21u4Ab fS4A== 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=2w+xN5vmdVOc7H4T1+khVBxtC+CfGd9RIlIVm7qydsQ=; b=qLDLGqhXEPFCefNkahVDR4rACUU6Jz2h5mb4nqrG7yaxOemHul4TKxD2VyJjAggtPe WzGTE3Elw7mGa4xxj1w+JhImi8/UZrPPnIFYOH3B27fNQ+vs2Uf1tbVuP7He0WxaKyCO H1z7EuyHUBNYhHqHuW9gj1uHPVs8w2pmQSBJKqI4Q+Mtjp1EzgM3XbQKqVBMvEpbbr8U gjHf9mETWhxB3YkmnRU8uqVdfK8fsi5Pc09rxWvS9vftdpr/vkYB+KdQFeJ1beVFx4AY gvph0RVhnfviitrupcoFMsg+evegIjNHGNzS5305dIoejlRth9tZqAfk+E++E4RncWOh pQgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=qH9D+Jj3; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=afIUouhb; 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 b12si1088047edz.497.2021.02.03.04.40.08; Wed, 03 Feb 2021 04:40:34 -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=qH9D+Jj3; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=afIUouhb; 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 S229638AbhBCMij (ORCPT + 99 others); Wed, 3 Feb 2021 07:38:39 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:56555 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhBCMii (ORCPT ); Wed, 3 Feb 2021 07:38:38 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 149BB5C0234; Wed, 3 Feb 2021 07:37:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 03 Feb 2021 07:37:32 -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=2w+xN5vmdVOc7H4T1+khVBxtC+C fGd9RIlIVm7qydsQ=; b=qH9D+Jj3CGre/ska8pG8g88D/DMtyz7VBNnAx1t4EU6 /aM0H1YxFXMytoQxRxllESUqwE03NOlwtvlyCfRD1cck3qnTc2TLWTRS95ZYfC9s 8YFmJkQrLr8StnkeCTMj9d5+FlAA+3jC/8+nKE1x/YKLxR9UJT0Rj0SLM4DIRhW8 oxKY7bdJ7U7ZycZbvzrUXyWFTwuVzGqnZ6awQriOcPhX3ZNsR5qr0d+P4wEGGO9H qvQyI+hp8uyUzDCFOauzmEdBYZTDEsWRDS5ohT0QVT3hDbhNOHpqyyF0m86wMzWu q4VOnlS4r9X7whVn8i5JE460WogeiHCas6D0vJkC5+g== 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=2w+xN5 vmdVOc7H4T1+khVBxtC+CfGd9RIlIVm7qydsQ=; b=afIUouhbKq+OP/iOmkXJ8M ZIleQxbogIiz+CeWDqe/pNEfBbU1k8TLv4WefNxcKF+gajSk+Rqhu6cqqOX8USxv uDpUB7oKa4R+ic+cLVXaUKrt/Ix9APeHFiJx41D0seuDslwcd4EgOdm70jJOT0gn TSFLVaSSXY42ZWrA5l3arWXx7RKqzmemryVmnWrrbpQpjbTiH1q4pcvGJwGynTaQ 0jz00urOjNhBDJR/1qeW8khJf+6AeBEHyBz4A6DHZoEc4TdbrdgVNVJe0a/7hJbh ds9sVcZuD02+SBtSPfkwBLuQE2Tz1yayrLinHrLlD+iL85tVIJDQVfmxFTU6TB6Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedvgdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecukfhppeeijedrudeitddrvddujedrvdehtdenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vg 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 30004240062; Wed, 3 Feb 2021 07:37:31 -0500 (EST) Date: Wed, 3 Feb 2021 04:37:29 -0800 From: Andres Freund To: Greg Kroah-Hartman , io-uring@vger.kernel.org Cc: 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: <20210203123729.3pfsakawrkoh6qpu@alap3.anarazel.de> References: <20200601174037.904070960@linuxfoundation.org> <20200601174048.647302799@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200601174048.647302799@linuxfoundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2020-06-01 19:54:21 +0200, Greg Kroah-Hartman wrote: > From: Jens Axboe > > [ Upstream commit b0beb28097fa04177b3769f4bb7a0d0d9c4ae76e ] > > 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 > Signed-off-by: Sasha Levin > --- > block/blk-core.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > This broke io_uring direct-io on ext4 over md. fallocate -l $((1024*1024*1024)) /srv/part1 fallocate -l $((1024*1024*1024)) /srv/part2 losetup -f /srv/part1 losetup -f /srv/part2 losetup -a # assuming these were loop0/1 mdadm --create -n2 -l stripe -N fast-striped /dev/md/fast-striped /dev/loop0 /dev/loop1 mkfs.ext4 /dev/md/fast-striped mount /dev/md/fast-striped /mnt/t2 fio --directory=/mnt/t2 --ioengine io_uring --rw write --filesize 1MB --overwrite=1 --name=test --direct=1 --bs=4k 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 Greetings, Andres Freund