From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F6CC433E7 for ; Fri, 9 Oct 2020 13:36:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 94EB52184D for ; Fri, 9 Oct 2020 13:36:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="e0ZExvcW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94EB52184D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 21F1C940007; Fri, 9 Oct 2020 09:36:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CE2F6B006E; Fri, 9 Oct 2020 09:36:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E542940007; Fri, 9 Oct 2020 09:36:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id D26106B006C for ; Fri, 9 Oct 2020 09:36:10 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6D90A180AD807 for ; Fri, 9 Oct 2020 13:36:10 +0000 (UTC) X-FDA: 77352485700.15.soda21_40135ad271e1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 460401814B0C7 for ; Fri, 9 Oct 2020 13:36:10 +0000 (UTC) X-HE-Tag: soda21_40135ad271e1 X-Filterd-Recvd-Size: 2388 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Fri, 9 Oct 2020 13:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4zcQLlvX1W3uQckN8sC5yZKmOZfSHdP1zxo1/ieXfYI=; b=e0ZExvcWDCTTDKroRSJi2pyYbV aGIhraqXzk3rhWNFeLzu3lbatZ0I9lyPnOjUuPuPnEyvB1r2Gu9o/8T2YQGkpP4cJLVuKEQvHiSvz 15PIRSHfe3AO+Q7Lpo0Rl4bWzU9HtIJFp2MSL/eLHupMOj8R9NMIqDy74chMk3q6R7Trc5Wv3azK+ l17DFsiZnnC0sYNExKFsS8ddMIOJ7csZKwP4wGq+fhyqIvtl/RVLwZTn2LaEwR1OMu5lOwtRbcGsq DdvKeY9gX/tcWNmVHktSo2z5yqsA4uHA10dZTXDvXLK1S7xkfSJHyJReuGjQyGpW55HeP87yT6HPF 5JE7eQPQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQsYu-0002eg-9k; Fri, 09 Oct 2020 13:35:56 +0000 Date: Fri, 9 Oct 2020 14:35:56 +0100 From: Matthew Wilcox To: Yafang Shao Cc: david@fromorbit.com, hch@infradead.org, darrick.wong@oracle.com, mhocko@kernel.org, akpm@linux-foundation.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 2/2] xfs: avoid transaction reservation recursion Message-ID: <20201009133556.GT20115@casper.infradead.org> References: <20201009125127.37435-1-laoar.shao@gmail.com> <20201009125127.37435-3-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009125127.37435-3-laoar.shao@gmail.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Oct 09, 2020 at 08:51:27PM +0800, Yafang Shao wrote: > PF_FSTRANS which is used to avoid transaction reservation recursion, is > dropped since commit 9070733b4efa ("xfs: abstract PF_FSTRANS to > PF_MEMALLOC_NOFS") and commit 7dea19f9ee63 ("mm: introduce > memalloc_nofs_{save,restore} API") and replaced by PF_MEMALLOC_NOFS which > means to avoid filesystem reclaim recursion. That change is subtle. > Let's take the exmple of the check of WARN_ON_ONCE(current->flags & > PF_MEMALLOC_NOFS)) to explain why this abstraction from PF_FSTRANS to > PF_MEMALLOC_NOFS is not proper. Reviewed-by: Matthew Wilcox (Oracle)