Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp19959ybz; Tue, 21 Apr 2020 14:17:20 -0700 (PDT) X-Google-Smtp-Source: APiQypLSEOqz+nG0ggLa7sICFnulS5Y6gXs5TE4Ceh2aj+AZ5AlFmx6FAZx10BZeRwH130oS/xA4 X-Received: by 2002:aa7:d7d8:: with SMTP id e24mr20974172eds.215.1587503840501; Tue, 21 Apr 2020 14:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587503840; cv=none; d=google.com; s=arc-20160816; b=fw6oHycLmy/YTX5Lk4qn7ZRL1ECPSchz//+yYIvIpeRdHJ9Ywb2pag3JpbcuBZQV9z YYCzI3xb3ZP2yL0xX3OYPwnFxgkEbpMEwBxYTmKxqBFK8Qk1p8fDm4ArNOHLv5C/SHaJ LnlP8UKEkqpFAXuw4nYKALKJlHkf+1YFMlTlYXT0fMoD2U5xayIayv2ibWPJIeEd3tsq igtumzMNmp41B+7zShm7TCaUAvcqyaKdIFYeUX7IiovrHeImwKIffv3dqLsDUZxsoWUa qqvMRtrvmLy5cq6pA0WQMCDcdWGsgr3a/lWt4ofMShtUJEW3k9mFq3KznM9GzJ3gZNV1 V/lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=Rh0oduei8ihMPBk5OrfclPdsrLUd9mlLu4L0uZcyt0M=; b=JmoK4K0gWqmA3epEWSoEhlpkznW7jvjVgjjndKu0fW924rNKhz7slbYsD+RuYDjnzm V9hz/0mvJzsxNk4TS/bJhR6+zq2QsBnBEb2eR9FLBoGGA3C++IwxWWttInTo+SFPiG7Z VwX9Moavvb16sgZm3c9nt47fSsWr6KqrkG/5t+EYE/qwquyjmDO/KZz2G6A29JBdXcb3 49+9hY9+ybCr5E+k+aUiEBcBBv0+H2qgfDh/PO5g6J3SU29WcP3rlWO5qdzAzuVpLni5 XAs7HmM6sIxxWUCRfwWO9ctDVdyFzvkpjPd1cXE05SIvTygtVtBtaF08pfLjKwiLB7Nb BgvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw10si2286062ejb.369.2020.04.21.14.16.52; Tue, 21 Apr 2020 14:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 S1726468AbgDUVPz (ORCPT + 99 others); Tue, 21 Apr 2020 17:15:55 -0400 Received: from mga07.intel.com ([134.134.136.100]:56627 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbgDUVPz (ORCPT ); Tue, 21 Apr 2020 17:15:55 -0400 IronPort-SDR: l7zdTU6JI+5/skH8yRDJzyY1J6A6LaXGnb45/grQ2PCETZVAG0vXbPH19JRZp03wp1TS3rTCYG LbIsR2ayMFfQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 14:15:54 -0700 IronPort-SDR: ddiadRnywX6gsEymptcBeSspi/JXDa1bXSdHzolWtcLj8QO+Av62LEnLmlRduCvJ9U3MTu+X1n pVrCRowtckyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,411,1580803200"; d="scan'208";a="247279829" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by fmsmga008.fm.intel.com with ESMTP; 21 Apr 2020 14:15:53 -0700 Date: Tue, 21 Apr 2020 14:15:53 -0700 From: Ira Weiny To: "Darrick J. Wong" Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, Al Viro , Jan Kara , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH V9 09/11] fs: Introduce DCACHE_DONTCACHE Message-ID: <20200421211553.GC3372712@iweiny-DESK2.sc.intel.com> References: <20200421191754.3372370-1-ira.weiny@intel.com> <20200421191754.3372370-10-ira.weiny@intel.com> <20200421202519.GC6742@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200421202519.GC6742@magnolia> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Apr 21, 2020 at 01:25:19PM -0700, Darrick J. Wong wrote: > On Tue, Apr 21, 2020 at 12:17:51PM -0700, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > DCACHE_DONTCACHE indicates a dentry should not be cached on final > > dput(). > > > > Also add a helper function to mark DCACHE_DONTCACHE on all dentries > > pointing to a specific inode when that inode is being set I_DONTCACHE. > > > > This facilitates dropping dentry references to inodes sooner which > > require eviction to swap S_DAX mode. > > > > Cc: Al Viro > > Signed-off-by: Ira Weiny > > > > --- [snip] > > diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c > > index de76f7f60695..3c8f44477804 100644 > > --- a/fs/xfs/xfs_icache.c > > +++ b/fs/xfs/xfs_icache.c > > @@ -559,7 +559,7 @@ xfs_iget_cache_miss( > > */ > > iflags = XFS_INEW; > > if (flags & XFS_IGET_DONTCACHE) > > - VFS_I(ip)->i_state |= I_DONTCACHE; > > + mark_inode_dontcache(VFS_I(ip)); > > ip->i_udquot = NULL; > > ip->i_gdquot = NULL; > > ip->i_pdquot = NULL; > > diff --git a/include/linux/dcache.h b/include/linux/dcache.h > > index c1488cc84fd9..56b1482d9223 100644 > > --- a/include/linux/dcache.h > > +++ b/include/linux/dcache.h > > @@ -177,6 +177,8 @@ struct dentry_operations { > > > > #define DCACHE_REFERENCED 0x00000040 /* Recently used, don't discard. */ > > > > +#define DCACHE_DONTCACHE 0x00000080 /* don't cache on final dput() */ > > "Purge from memory on final dput()"? Sounds good to me, Ira > > --D >