Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp690565ybg; Mon, 1 Jun 2020 11:47:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNcxacEFe4Sy/1glxDPaZwIb+X2/uIyiEqckJ+y2G/S9t+K1Sw8vOoij9ko3gtlQXc+SBG X-Received: by 2002:a05:6402:3185:: with SMTP id di5mr22801012edb.330.1591037221426; Mon, 01 Jun 2020 11:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591037221; cv=none; d=google.com; s=arc-20160816; b=an83kwp4YMG1ITp4eZHaVEpv+87513fYKBsEJpg1PeRVOj0sbMP6fb3t/hwuUazxcW N3FQDYijspmJYzggS6fWA00HPr+I5DGxR4MragfqySkvEHJTD0A7+OyjRzUO/TV6oTrI 7+T/vS9hNZH5dfhxGWEu8aMqNj81OkQm9+jDB9pfGowKnfH2IFZHaUozKnWwLzYzs65F 8iuaKAZnc/wjFB7x+GynNUaXZaY3o/QIWwiKcPHYKUkB7ZfnHwSMDhjLq2qbg5Jh4m41 AnO846SLaqJDk2mYHM8soWC8Cgti5xV7seWukGNeyVo91KBjztWZLICZyVuyZ4yTmKHR 4ZIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AKroqVY6YuNq1JYAyzVsd8K87yX1LwgKo2UN4kutMxM=; b=D15/n2q0Swl8wBik/fkAdHvNUNv+KCyeYA2wQBxHxFaSplTBNrMRgiJWpiV+I348Fx V4/TWp5egjb3IF58dweoceyehOYo3A4JnvdM1suZgiGlBIkRDnpuA0BY7CPDjmTRGWdl dL6U5EsWrH46b0S1GtD3852ePQOVkR/UANMJ1ChjbDPudp0spVzHAC8TWKkJHZ47hvqw iwo9LTeYpkjtqQMRwvmF1tkwiZSDrM7R41VVmn/7B+6qc/iG5WlhUNXVrIOOYmBkY1Zy g+R0LFGxlrQ/5RjzjZibEzkVPgRcczFZn9pdp/xfC+5D6j9aiPd/Naioi3nmEkzCC+GU 9GeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JzDFYvLL; 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 e9si160057edn.18.2020.06.01.11.46.38; Mon, 01 Jun 2020 11:47:01 -0700 (PDT) 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=@kernel.org header.s=default header.b=JzDFYvLL; 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 S1730940AbgFASo7 (ORCPT + 99 others); Mon, 1 Jun 2020 14:44:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:56716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730959AbgFASKG (ORCPT ); Mon, 1 Jun 2020 14:10:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C8032068D; Mon, 1 Jun 2020 18:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035006; bh=jNDYEjGX5dcj38Vs0IdUJol9ZXOahXz5X18qV3qqY4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JzDFYvLLC+H0AUgKWFae4ivV0eEUkvOmpvNKAU28ARrpfa7kNS2bErbUrOze7zYRZ WEwkidTdszMGabusOVX4yHnNlZigSftiIuSGkCcuBTugh5u2l103jrk/xDgfiBqugK dgYPr11ry7Z8qj/2bu92DJt0hOn70WtcDcITlDt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bijan Mottahedeh , Jens Axboe , Sasha Levin Subject: [PATCH 5.4 103/142] Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT" Date: Mon, 1 Jun 2020 19:54:21 +0200 Message-Id: <20200601174048.647302799@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) diff --git a/block/blk-core.c b/block/blk-core.c index 1075aaff606d..d5e668ec751b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -886,14 +886,11 @@ generic_make_request_checks(struct bio *bio) } /* - * 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. + * For a REQ_NOWAIT based request, return -EOPNOTSUPP + * if queue is not a request based queue. */ - if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) { - status = BLK_STS_AGAIN; - goto end_io; - } + if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) + goto not_supported; if (should_fail_bio(bio)) goto end_io; -- 2.25.1