Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3616327pxk; Mon, 21 Sep 2020 20:10:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhT5+95aWShIvG5FRMcDxVgr333oYxWwQLuyRWKfjfcJ+VqW83gIea/GqaMDKmDJbS9uEh X-Received: by 2002:a17:906:556:: with SMTP id k22mr2585095eja.369.1600744209549; Mon, 21 Sep 2020 20:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600744209; cv=none; d=google.com; s=arc-20160816; b=gdvNjy7+gpCqlEZfb1uth65PsRfYeq2fi/mQj6duiHuVHzOXumUsyy9U5R6vn6U5+y bFT5fRgmLOcCdVIaYxS6RSt04xu08/dCFoeEl5oKpHgT7RXGQDfX1h+hyJ2KuWC3FV6y GAqAFOK+7cfnMKujdIUr0Z2vkrQGj/sR38GhNB2xqD2kf9BEsvCHYnpAeOZy+IziZYex rwB2oIXMy48saC2TeJIP1IHoGtjMTAovZR6hm3J/p8u93daHxwJn+vwTtc2guLQFKNmB ZJp8p17vM6+X+svqOoIrpzDlr6JxHONqJ4epeMqFOaa+HN7sYm5kPy7bLhLjiecRU2NG wUMg== 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; bh=iNUvkNtmUoE8Uzfg6aV7Y6YFGbnkc0hNwqx0B2rvU2c=; b=U8I1vHOpdjzyr+6MS9XpHYTTgOncVYRCAjnGYYrnSVxOordIGir2S3kiuPs86KCoAT COTOkwgTUFIOoFaz1c5LQ4hPXSqy9C2Q1Sg9i8zakrgwiVeMZ+8CmYagqej/2b8SUKCt pw4gBb/j3OpZA6Uh6/2Q8zXWrWXipfIEnMMYjlFmnENL6adr5s/RGgNPCkCDF2+1GTkD BtVtvjzW1DQcAC+Th5hv7Ias+MNtMcQeY24MO8VSx+FkFL6ujjPuaPyeTqXGQ0N48EuE EnQARYnPufcV7mCofr+1gfuYZKFf+S1WuDZ7UQK8fBDOtTSMJgTcN/9xxeFlVQKjSFHn KGUA== 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 y18si9682842edv.283.2020.09.21.20.09.46; Mon, 21 Sep 2020 20:10:09 -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; 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 S1729643AbgIVC3q (ORCPT + 99 others); Mon, 21 Sep 2020 22:29:46 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:21398 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729617AbgIVC3q (ORCPT ); Mon, 21 Sep 2020 22:29:46 -0400 X-Greylist: delayed 605 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Sep 2020 22:29:45 EDT X-IronPort-AV: E=Sophos;i="5.77,288,1596470400"; d="scan'208";a="99488774" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 22 Sep 2020 10:19:38 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 2C55948990E9; Tue, 22 Sep 2020 10:19:38 +0800 (CST) Received: from G08CNEXCHPEKD06.g08.fujitsu.local (10.167.33.205) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 22 Sep 2020 10:19:36 +0800 Received: from localhost.localdomain (10.167.225.206) by G08CNEXCHPEKD06.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 22 Sep 2020 10:19:35 +0800 Date: Tue, 22 Sep 2020 10:19:35 +0800 From: Hao Li To: Dave Chinner CC: , , , Subject: Re: [PATCH v2] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode() Message-ID: <20200922021935.GA56122@localhost.localdomain> References: <20200904075939.176366-1-lihao2018.fnst@cn.fujitsu.com> <20200906214002.GI12131@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200906214002.GI12131@dread.disaster.area> X-yoursite-MailScanner-ID: 2C55948990E9.AC9F3 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: lihao2018.fnst@cn.fujitsu.com X-Spam-Status: No Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 07, 2020 at 07:40:02AM +1000, Dave Chinner wrote: > On Fri, Sep 04, 2020 at 03:59:39PM +0800, Hao Li wrote: > > If generic_drop_inode() returns true, it means iput_final() can evict > > this inode regardless of whether it is dirty or not. If we check > > I_DONTCACHE in generic_drop_inode(), any inode with this bit set will be > > evicted unconditionally. This is not the desired behavior because > > I_DONTCACHE only means the inode shouldn't be cached on the LRU list. > > As for whether we need to evict this inode, this is what > > generic_drop_inode() should do. This patch corrects the usage of > > I_DONTCACHE. > > > > This patch was proposed in [1]. > > > > [1]: https://lore.kernel.org/linux-fsdevel/20200831003407.GE12096@dread.disaster.area/ > > > > Fixes: dae2f8ed7992 ("fs: Lift XFS_IDONTCACHE to the VFS layer") > > Signed-off-by: Hao Li > > --- > > Changes in v2: > > - Adjust code format > > - Add Fixes tag in commit message > > > > fs/inode.c | 4 +++- > > include/linux/fs.h | 3 +-- > > 2 files changed, 4 insertions(+), 3 deletions(-) > > Looks good. > > Reviewed-by: Dave Chinner > Hi, As discussed in [1], this patch is the basis of another one. Could I submit the second patch now to change the DCACHE_DONTCACHE behavior or I have to wait for this patch to be merged. [1]: https://lkml.org/lkml/2020/8/30/360 Thanks, Hao Li > -- > Dave Chinner > david@fromorbit.com > >