Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2297706pxb; Fri, 5 Feb 2021 14:14:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5ptFMxx3y1ndkPdXOOTA4ugg07AP596XuCGp8u4FBCZ7pcvEGirj0ebm343kgzjDNHx8r X-Received: by 2002:a17:906:f6c7:: with SMTP id jo7mr6257302ejb.178.1612563252036; Fri, 05 Feb 2021 14:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612563252; cv=none; d=google.com; s=arc-20160816; b=a3yVMzR1Eo2IOu5iyMML8YXaACmIlold/ilssdvAB5dFys6R16LK0ZncA8FwmdEuKw lzT6VA7FxJC3nGoBoPEqPLCAp/I8T6IxqXJgdvHeTBX/LLNXNQCljHyX1ylfAbaUvnC5 qlH1OtTRDFgFmUTY7bdFfZo43Z4WSA6MfF6PSu9dVIgdE8QtuGGs6uh5fWi1D+tSkUF+ FC2YGkZAMGDBYUtCpQT9rGvpRpwfkJg/wju2Qe/AxQYY0ky0cb/0Lu9J+tdRrCDhMow0 jNeQh3KIT4J1/D+YgX7KeKrhLTiI0oFmzqOzeOOKS0MzatFdcv3DVZZDGHA9jQE3ePKG wGcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xk1V1I0oyzkhH1SVQqCM3Yxt7MvGsQi0HiqL0GoGt/c=; b=QiLryHlnSpt25Vr9kOtl4Y4dR58KMoTsZT9KO0M24unMLltWjHGdANT5TWIU2B3M0w lxiAPeRgE7WG8lffJ8XDAAHEVX2AdIGPM2Xu6C7AYpX9dWfMTUvxGz3Teo+C8rbugnB4 9tK4zrcRna2SEy4bP5X3TTmwXoH+YqsAAMi/oD9Qr7yanDNGYu7RUNP8zveekyn4M3MS RbqXPpLWbf/F0wfVessJNAG0DzU98CV6JHLShy2hR5SimqMKhFHhuRF2Xj+Wx2uuWqj4 lkjZgUpeDqI/34s3C4newUw5QcvyP+/4pMpoUsUKGuqDhnO1Npo5kq5tqyLYywhS9/KI ZqmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nHPoqjt/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si6200396edk.387.2021.02.05.14.13.47; Fri, 05 Feb 2021 14:14:12 -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=@linuxfoundation.org header.s=korg header.b="nHPoqjt/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233156AbhBEWLC (ORCPT + 99 others); Fri, 5 Feb 2021 17:11:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:45264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232951AbhBEO5X (ORCPT ); Fri, 5 Feb 2021 09:57:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA68B65056; Fri, 5 Feb 2021 14:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534344; bh=0TCr50uaJ/Er9v0M1Rd47FXEfjx301MaEuqIpGUAO5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nHPoqjt/wHtQ1qF3dhmXsoARC2ZKpmWwVH4dnhhNAgxgBGWuP1aMD0fsEhZO77dcs O0Llk9iEnC+R0BMdfC004HAjreUA+1Q9tzJqP6ZNKKMsimFtzpvKZdqYuX2sbG+QRR CL5TtzuIPqKDnxGC6FV9reXyv0Nyrm4a5V8yPPVk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andres Freund , Bijan Mottahedeh , Jens Axboe , Sasha Levin Subject: [PATCH 5.4 04/32] Revert "Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"" Date: Fri, 5 Feb 2021 15:07:19 +0100 Message-Id: <20210205140652.538665933@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140652.348864025@linuxfoundation.org> References: <20210205140652.348864025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman This reverts commit bba91cdba612fbce4f8575c5d94d2b146fb83ea3 which is commit b0beb28097fa04177b3769f4bb7a0d0d9c4ae76e upstream. It breaks things in 5.4.y, so let's drop it. Reported-by: Andres Freund Cc: Bijan Mottahedeh CC: Jens Axboe Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- block/blk-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/block/blk-core.c +++ b/block/blk-core.c @@ -886,11 +886,14 @@ generic_make_request_checks(struct bio * } /* - * For a REQ_NOWAIT based request, return -EOPNOTSUPP - * if queue is not a request based queue. + * Non-mq queues do not honor REQ_NOWAIT, so complete a bio + * with BLK_STS_AGAIN status in order to catch -EAGAIN and + * to give a chance to the caller to repeat request gracefully. */ - if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) - goto not_supported; + if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) { + status = BLK_STS_AGAIN; + goto end_io; + } if (should_fail_bio(bio)) goto end_io;