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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 87062C2BA1A for ; Sun, 5 Apr 2020 06:19:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 661A620753 for ; Sun, 5 Apr 2020 06:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726407AbgDEGTs (ORCPT ); Sun, 5 Apr 2020 02:19:48 -0400 Received: from mga17.intel.com ([192.55.52.151]:48527 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgDEGTs (ORCPT ); Sun, 5 Apr 2020 02:19:48 -0400 IronPort-SDR: 0JF/wGpFCelx3CgApolLUStyJsNdNVW979B04mnerw1lWq6BEC8nlYkVqDFCp9KIufPhX6tg3h hV5j6Xo/vMng== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2020 23:19:47 -0700 IronPort-SDR: 0110s7953263huErBoTRO4j83eC8Y3EFM92Atlg5RxKrkmln04D0YozOxKZzJHYAvkykohpDAn 6hdmIjIg2wtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,346,1580803200"; d="scan'208";a="253776526" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by orsmga006.jf.intel.com with ESMTP; 04 Apr 2020 23:19:46 -0700 Date: Sat, 4 Apr 2020 23:19:46 -0700 From: Ira Weiny To: "Darrick J. Wong" Cc: Jan Kara , Christoph Hellwig , Dave Chinner , "Theodore Y. Ts'o" , Dan Williams , Linux Kernel Mailing List , Alexander Viro , linux-ext4 , linux-xfs , linux-fsdevel , Andrew Morton , Linus Torvalds Subject: Re: [PATCH V5 00/12] Enable per-file/per-directory DAX operations V5 Message-ID: <20200405061945.GA94792@iweiny-DESK2.sc.intel.com> References: <20200316095509.GA13788@lst.de> <20200401040021.GC56958@magnolia> <20200401102511.GC19466@quack2.suse.cz> <20200402085327.GA19109@lst.de> <20200402205518.GF3952565@iweiny-DESK2.sc.intel.com> <20200403072731.GA24176@lst.de> <20200403154828.GJ3952565@iweiny-DESK2.sc.intel.com> <20200403170338.GD29920@quack2.suse.cz> <20200403181843.GK3952565@iweiny-DESK2.sc.intel.com> <20200403183746.GQ80283@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200403183746.GQ80283@magnolia> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > In summary: > > > > - Applications must call statx to discover the current S_DAX state. > > Ok. > > > - There exists an advisory file inode flag FS_XFLAG_DAX that is set based on > > the parent directory FS_XFLAG_DAX inode flag. (There is no way to change > > this flag after file creation.) > > > > If FS_XFLAG_DAX is set and the fs is on pmem then it will enable S_DAX at > > inode load time; if FS_XFLAG_DAX is not set, it will not enable S_DAX. > > Unless overridden... > > Ok, fine with me. :) :-D > > > - There exists a dax= mount option. > > > > "-o dax=off" means "never set S_DAX, ignore FS_XFLAG_DAX" > > "-o nodax" means "dax=off" > > I surveyed the three fses that support dax and found that none of the > filesystems actually have a 'nodax' flag. Now would be the time not to > add such a thing, and make people specify dax=off instead. It would > be handy if we could have a single fsparam_enum for figuring out the dax > mount options. yes good point. I'm working on updating the documentation patch and I think this might also be better as: -o dax=never Which is the opposite of 'always'. > > > "-o dax=always" means "always set S_DAX (at least on pmem), ignore FS_XFLAG_DAX" > > "-o dax" by itself means "dax=always" > > "-o dax=iflag" means "follow FS_XFLAG_DAX" and is the default > > > > - There exists an advisory directory inode flag FS_XFLAG_DAX that can be > > changed at any time. The flag state is copied into any files or > > subdirectories when they are created within that directory. If programs > > require file access runs in S_DAX mode, they'll have to create those files > > "...they must create..." yes > > > inside a directory with FS_XFLAG_DAX set, or mount the fs with an > > appropriate dax mount option. > > Otherwise seems ok to me. Thanks! Ira