Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp275518ybz; Tue, 21 Apr 2020 20:46:59 -0700 (PDT) X-Google-Smtp-Source: APiQypIQHUcQwkFAb4H/ImmOHXf3S0HXXjfV/pNiMoYdDhbvCgyVrS78J+C8rRCQu62+OpIehGjV X-Received: by 2002:aa7:d413:: with SMTP id z19mr14502089edq.80.1587527219570; Tue, 21 Apr 2020 20:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587527219; cv=none; d=google.com; s=arc-20160816; b=j/JdAgCvS8zduJl9elxpMj8ViW81nZi1V3/kEGOFPci3OWaFmnf6+hgX4bM0fDiFLn A35CBqu8h3jPRqcDAHMQGmP8R4en90niVj1+mphwfekt4lsTnWB8/r/kwh4uggtnG7Gg iO6qXGejHpOXwrioe7BTBkbNjN1QZCBSnmDh/Pkqs5lgh8pJzjkfQhgWTYPGJ31MdCZ2 xfXNsHJqF8vLlmfcKMVbCQcmv1SDtwpCZAXAcLa6iIMTLlFQCNFWO+EuIcqEWRs1vLWi 41bvKdFYgRAErOphJAx7wvnHx6wqLikqA7OmxoUNShtDteE+85hgIdK2HQ4FicwwQczN 1KYw== 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=t/VDDeGG8AfZK0ehMxDMFWJ7Q6Z1h1+2RpDTHM6qfLg=; b=BAsy6eRraUMyRBeuEQ7kEuzzPmnyfB+NEOXz4Q2aRZbX950TbnJ9Jc25v1snb5rKBk IeK2gnXhoatHD63wS7LZROFEF67890AgVJiA2JcFyBmfcziaBEAhcRQVvxlMS0RyHMam zLvwCmVyWVDa2/RN2BDU3HUPVNffkaE8yISFd81/dZf7B5TQmMcdckVVC9BlJWXpya80 KAc4oTt+9iZNdehOJLoQ7LJ6VuMo8JEM6cXcbA3iZEXsF10tw3QTGuNHJcBQTrAB/Xp4 q1rEm81pY26mCZq3Q8D+aBaw+0pCq12gtnlA31Lw9KInA5DKgJtWaVdfzD+NQKEZdDn6 r3jQ== 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 q4si2756017edh.273.2020.04.21.20.46.27; Tue, 21 Apr 2020 20:46:59 -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 S1726437AbgDVDqK (ORCPT + 99 others); Tue, 21 Apr 2020 23:46:10 -0400 Received: from mga04.intel.com ([192.55.52.120]:52549 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgDVDqK (ORCPT ); Tue, 21 Apr 2020 23:46:10 -0400 IronPort-SDR: 6Ut0L7yFzfrB6TRQQ5x4/0IbWFB4BtN6O3EFQjNrdYJ8FMKv8+rFCoA3QIUrfyVyO8gw2I7+gB DI+XOCQDS56A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 20:46:10 -0700 IronPort-SDR: /eKAMA4Z+MGLgmc7pg47zfyleZZfStf928BZ4SShuUGk9rZzdCpDBrU1XUAGBDYUIyMNfIvWzv f+akZuFVWrlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="402401206" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by orsmga004.jf.intel.com with ESMTP; 21 Apr 2020 20:46:09 -0700 Date: Tue, 21 Apr 2020 20:46:09 -0700 From: Ira Weiny To: Al Viro Cc: "Darrick J. Wong" , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, 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: <20200422034609.GH3372712@iweiny-DESK2.sc.intel.com> References: <20200421191754.3372370-1-ira.weiny@intel.com> <20200421191754.3372370-10-ira.weiny@intel.com> <20200421202519.GC6742@magnolia> <20200422023407.GH23230@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422023407.GH23230@ZenIV.linux.org.uk> 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 Wed, Apr 22, 2020 at 03:34:07AM +0100, Al Viro wrote: > On Tue, Apr 21, 2020 at 01:25:19PM -0700, Darrick J. Wong wrote: > > > > 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. > > Explain, please. Questions: > > 1) does that ever happen to directories? Directories never get S_DAX set. So the eviction only needs to happen on inodes. But that can't happen without dentries also dropping their references. > 2) how much trouble do we get if such inode is *NOT* evicted for, say, several > days? No trouble at all. Users understand that changing the FS_XFLAG_DAX setting does _not_ immediately result in S_DAX changing. It is intended that applications requiring a change of mode would flip the FS_XFLAG_DAX close the file and wait for the eviction (or force it through a drop cache if they have permission). Ira