Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp43826pxb; Tue, 2 Mar 2021 18:29:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhwr+XH03N3CNtgHMVl3gTbMQyGLpoUJp8wV9BvCYlxV8IQmdwTXkcoPRwN8MpjFrM5mk8 X-Received: by 2002:a17:906:c1d7:: with SMTP id bw23mr20191668ejb.554.1614738594044; Tue, 02 Mar 2021 18:29:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614738594; cv=none; d=google.com; s=arc-20160816; b=BXsqxTm+LuGM83uldwZ+elCqRmtW1UvH3Bgu0wS/Iuvarh9PwuTrQ5r+Iru7LsogYq RbG3dI5Xzl+1KnQtgjAKT1kqbzx3Ccrn6tAaBlFK+0Y8zTvImceCjUNGKTHQCe7B//kO +TjDGRYp1+OeNy2qV2ihX9FPIIMeQ3RxVfYIWHnZqXAvpJ3458UZHhk94mvUZTld95lw 05yZTkvRTjiftbl6C+P2afdI8ShI2YkOs1bFswUkj0gn4sNroddO5rzE14wcoIsBMhca Mp5XHFtZrI82fqQuZaeYOhBe+xGVF9f0Kx8m28JAjLBiYFEAOp9AhS3OWjXADNPWzg4m P8/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date; bh=thack4fYusMoSVtrhS6WND/PWzk1gHqXJh94OqKfxw4=; b=CVd6E3YYFi3nC5avZixA5jcAa+nS1TIZewfsJmGK1kiJiOGWBpsUgY/3wwueVfZl7e 4WG5vjhfjFoQig+kP/sYW5VlTSzMoEikh7tX3IdXXalSn02LLwT+pZX1e9/LqrXoKc2i Lk0Mbeshk8iT9HGZ7aW/r8wyB6o5adoEqFo+NKXAfRbhPKPpCrs4V8M5vhnn7ZSyowjf 8XmC3KQfjjHAjkF+Tig0VlacAF38tmdBenx7+dZn/flXLMddTvIPMxx9S9ndgOtkVQ8V btjkKJRGF72wr0rlJ/TzsVXSV0KlS1KJ6Uryc7KbHMax5MPMD1O5594Q3EZfD8RJQiSG 06sA== ARC-Authentication-Results: i=1; mx.google.com; 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 lj27si5714917ejb.513.2021.03.02.18.29.31; Tue, 02 Mar 2021 18:29:54 -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; 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 S233470AbhCALHK (ORCPT + 99 others); Mon, 1 Mar 2021 06:07:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:53086 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233090AbhCALHE (ORCPT ); Mon, 1 Mar 2021 06:07:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C1E68AE03; Mon, 1 Mar 2021 11:06:22 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id F3A7CDA7B0; Mon, 1 Mar 2021 12:04:27 +0100 (CET) Date: Mon, 1 Mar 2021 12:04:27 +0100 From: David Sterba To: Christoph Hellwig Cc: Stephen Rothwell , Andrew Morton , Linux Kernel Mailing List , Linux Next Mailing List , Martin Raiber , "Matthew Wilcox (Oracle)" Subject: Re: linux-next: manual merge of the akpm-current tree with the btrfs tree Message-ID: <20210301110427.GT7604@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Christoph Hellwig , Stephen Rothwell , Andrew Morton , Linux Kernel Mailing List , Linux Next Mailing List , Martin Raiber , "Matthew Wilcox (Oracle)" References: <20210127223918.1b3e4b3f@canb.auug.org.au> <20210215084634.06c1b430@canb.auug.org.au> <20210226103250.7b08a233@canb.auug.org.au> <20210226051626.GA2072@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226051626.GA2072@lst.de> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 06:16:26AM +0100, Christoph Hellwig wrote: > On Fri, Feb 26, 2021 at 10:32:50AM +1100, Stephen Rothwell wrote: > > > > - return filemap_read(iocb, to, ret); > > > > + if (iocb->ki_flags & IOCB_NOWAIT) > > > > + iocb->ki_flags |= IOCB_NOIO; > > > > + > > > > - ret = generic_file_buffered_read(iocb, to, ret); > > > > ++ ret = filemap_read(iocb, to, ret); > > > > + > > > > + if (iocb->ki_flags & IOCB_NOWAIT) { > > > > + iocb->ki_flags &= ~IOCB_NOIO; > > > > + if (ret == 0) > > > > + ret = -EAGAIN; > > > > + } > > > > + > > > > + return ret; > > > > } > > I think the above code looks completely bogus. Instead whatever code > in btrfs hecks for IOCB_NOIO to avoid blocking readahead should also > check IOCB_NOWAIT. Thanks for the comment, I've removed the patch from for-next and notified the authors.