Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3064365ybb; Sun, 12 Apr 2020 23:05:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJ6OyJ2++bkK+Cyzkd+KL7KOiKqhNrDlXP+W6iww6x+MssPeR39Ad2/snFePjlxy20IhkNu X-Received: by 2002:ac8:1628:: with SMTP id p37mr533644qtj.179.1586757912076; Sun, 12 Apr 2020 23:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586757912; cv=none; d=google.com; s=arc-20160816; b=UA2c0hmWPFPeMfL4GI5momgIAhBW8rkSDqzt2Yv1Hj48x+zDcSrQguhHiYoXMy6ZRX yqAcLa8nexgK7xgNQbM30NcuNe6tcPzsO4jBBT0sSLHJKTIvpsXJ7MVmSQ1zUb88B6CD 6JiEZlZbd3Gy0dJOWQpBK2v8Rv4rOcXyLmqWP4p9UTBISHrD5uylz57z7KpHkq85i58I TI4cx6AZx0jC2VFYQlMoQsz5ucPKRtH/IrIfZdLLlD40AWZGEYOs8gcX48L8HM6XHuDb Mh/RbWqkn3Tpo+rWym78CVOAcl2Gend+9MMLkjodBphhf/dxJo3H3g5deMp3a/HNCYAo QSBg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=Z4BSpKDJBJHyo9lLV6tXeXBxfKmuLeb/4YQ0YVSdZmo=; b=xWuIHc16KreE2yC6y0zX9nj7AML/Ts4HApzr4i/0l2+HaqkBEAsYoV3a7ECXuWdl5G 2iXuYU8AZRAakxTTIE1WdHYtx8RkL3BcZzO5TnKBNE1wgXPV4qM1OrGe2T0LERLHM4M6 xCgdhY7HRDCvhtcIgjHS/Ouo4K9P0H96jklw5WgVeY9iu22aDvFEy5K0NoyC0Ob2u7q/ Q4hA25jLlmn/d3a4PvXIOqBEbZg/35aY9CYwMYnFxLH+tXP2OTHYSHXjQX9kCpmJUSz8 uHZo6qa/A3yf37KqsZDsRyAV3LGxfEHdXMsJFrBdLr7v43gxZ6csfVmni9yMyMqsNa3R SCXg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id k18si5446997qkg.117.2020.04.12.23.04.57; Sun, 12 Apr 2020 23:05:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgDMFlc (ORCPT + 99 others); Mon, 13 Apr 2020 01:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:42680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729002AbgDMFla (ORCPT ); Mon, 13 Apr 2020 01:41:30 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E15DC008675; Sun, 12 Apr 2020 22:41:30 -0700 (PDT) IronPort-SDR: QhjFJJJ1RMjaeYf8q4wFcxZHvlXCA+RMs1tys42YUZ9Ayn/yhuDQ0g7wQOGuFNwbPFJ7mJoGu7 RzlGCRTeyE+Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2020 22:41:26 -0700 IronPort-SDR: Hcd+XAaWBlBPrMyHf4SMn5E5Q7Ywj8yI+KmEfJr3A8P8T/wc7H4UB7zHJ74tNgFP9CiuvYhgdP DQ8rvnEyDPHQ== X-IronPort-AV: E=Sophos;i="5.72,377,1580803200"; d="scan'208";a="270977630" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2020 22:41:26 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, "Darrick J. Wong" Cc: Ira Weiny , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH V7 7/9] fs: Define I_DONTCACNE in VFS layer Date: Sun, 12 Apr 2020 22:40:44 -0700 Message-Id: <20200413054046.1560106-8-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200413054046.1560106-1-ira.weiny@intel.com> References: <20200413054046.1560106-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny DAX effective mode changes (setting of S_DAX) require inode eviction. Define a flag which can be set to inform the VFS layer that inodes should not be cached. This will expedite the eviction of those nodes requiring reload. Signed-off-by: Ira Weiny --- include/linux/fs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index a818ced22961..e2db71d150c3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2151,6 +2151,8 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, * * I_CREATING New object's inode in the middle of setting up. * + * I_DONTCACHE Do not cache the inode + * * Q: What is the difference between I_WILL_FREE and I_FREEING? */ #define I_DIRTY_SYNC (1 << 0) @@ -2173,6 +2175,7 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, #define I_WB_SWITCH (1 << 13) #define I_OVL_INUSE (1 << 14) #define I_CREATING (1 << 15) +#define I_DONTCACHE (1 << 16) #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) #define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES) @@ -3042,7 +3045,8 @@ extern int inode_needs_sync(struct inode *inode); extern int generic_delete_inode(struct inode *inode); static inline int generic_drop_inode(struct inode *inode) { - return !inode->i_nlink || inode_unhashed(inode); + return !inode->i_nlink || inode_unhashed(inode) || + (inode->i_state & I_DONTCACHE); } extern struct inode *ilookup5_nowait(struct super_block *sb, -- 2.25.1