Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp871994ybv; Thu, 13 Feb 2020 11:05:37 -0800 (PST) X-Google-Smtp-Source: APXvYqz51tvFo81OnXfpo/tB7V9tCyYSUZPgur7h2vtzpZq0P3WZenqCA3QEUua4/wXiFIcyEeb2 X-Received: by 2002:aca:c08b:: with SMTP id q133mr3813348oif.46.1581620737060; Thu, 13 Feb 2020 11:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581620737; cv=none; d=google.com; s=arc-20160816; b=hP8TwQeNulTvW3Gu4liuyBihJrudu6pYCMN6hktH5KL+cv8H3gZa/0FMO2Ltbbdpib MDQb5gUpaQs0QAskeCdMI61qFr0br6EoCoBPApV5Aq76LeBxJ7AMF0yjb9ridT3+qxKm HRlmJoe8b7zvKoQo2+MpXdZwotcxAnfgypBE8prrALQhtSEg1Ds7Jt8UECe9tex12hWJ KzcyQcvn6Wy7yEZy4L28IYqG8Eak6TYdzmHjTmQKXgqZf8bItVETTi/UquKSo9P3NzLM Zf+jPBc4bcfOCuBy2+SKLB6n++wYMSC7jsDd+2qdwaYzatqmYs7YSoc1sEpZfTVkuQzo ZY7g== 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; bh=Nd1/x2rrhFxXfKrc/rvKcvzgKEmSIqJ/unGcGpArZFc=; b=QrPWOmFXzU8zH/PtEO0o+ABjUGT8bM6oBIONFohQDB6G7TKmr1uWwfb5T65tQmYs2n 4VwvpQ8r2k0JVawR2xZfZAT+N/hnMKPr6wgsy2QKqKjc7tJQNn4a9RCF0S6NIK+mqqQP hYAytLGeYpioN/y684RmUxz/opApBm4JIPGQpTjTfPEyooG/aY+a/aR1PWclw1YmYWmD 7bjXqKgJaMVBX+Bb0DrKPgWYwCALd8Xed4CHx2AtN8Ii8vpGVVDJ2ecaJDw9UBTD6dCM uk+ykNIqb24vYKcaNU7jNPVFyH28pNR6YRDkC81GxCLfqZWOMuhyo4BrVAdBHQUH1xnc Icpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id l139si1534378oih.233.2020.02.13.11.05.18; Thu, 13 Feb 2020 11:05:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 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 S1728176AbgBMTCU (ORCPT + 99 others); Thu, 13 Feb 2020 14:02:20 -0500 Received: from mga17.intel.com ([192.55.52.151]:55974 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbgBMTCU (ORCPT ); Thu, 13 Feb 2020 14:02:20 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 11:01:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,437,1574150400"; d="scan'208";a="381198093" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga004.jf.intel.com with ESMTP; 13 Feb 2020 11:01:57 -0800 Date: Thu, 13 Feb 2020 11:01:57 -0800 From: Ira Weiny To: Jeff Moyer Cc: linux-kernel@vger.kernel.org, Alexander Viro , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 00/12] Enable per-file/directory DAX operations V3 Message-ID: <20200213190156.GA22854@iweiny-DESK2.sc.intel.com> References: <20200208193445.27421-1-ira.weiny@intel.com> <20200211201718.GF12866@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Feb 12, 2020 at 02:49:48PM -0500, Jeff Moyer wrote: > Ira Weiny writes: > > > On Mon, Feb 10, 2020 at 10:15:47AM -0500, Jeff Moyer wrote: > >> Hi, Ira, > >> > >> Could you please include documentation patches as part of this series? > > > > I do have an update to the vfs.rst doc in > > > > fs: Add locking for a dynamic DAX state > > > > I'm happy to do more but was there something specific you would like to see? > > Or documentation in xfs perhaps? > > Sorry, I was referring to your statx man page addition. Ah yea I guess I could include that as a patch. I just wanted to get buy off on the whole thing prior to setting documentation in. > It would be > nice if we could find a home for the information in your cover letter, > too. Right now, I'm not sure how application developers are supposed to > figure out how to use the per-inode settings. I'm not sure either. But this is probably a good start: https://www.kernel.org/doc/Documentation/filesystems/dax.txt Something under the Usage section like: diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt index 679729442fd2..1bab5d5d775b 100644 --- a/Documentation/filesystems/dax.txt +++ b/Documentation/filesystems/dax.txt @@ -20,8 +20,18 @@ Usage If you have a block device which supports DAX, you can make a filesystem on it as usual. The DAX code currently only supports files with a block size equal to your kernel's PAGE_SIZE, so you may need to specify a block -size when creating the filesystem. When mounting it, use the "-o dax" -option on the command line or add 'dax' to the options in /etc/fstab. +size when creating the filesystem. + +Files can then be enabled to use dax using the statx system call or an +application using it like 'xfs_io'. Directories can also be enabled for dax +to have the file system automatically enable dax on all files within those +directories. + +Alternately, when mounting it one can use the "-o dax" option on the command +line or add 'dax' to the options in /etc/fstab to globaly override all files to +use dax on that filesystem. Using the "-o dax" does not change the state of +individual files so remounting without "-o dax" will revert them to the state +saved in the filesystem meta data. Implementation Tips for Block Driver Writers > > If I read your cover letter correctly, the mount option overrides any > on-disk setting. Is that right? Yes > Given that we document the dax mount > option as "the way to get dax," it may be a good idea to allow for a > user to selectively disable dax, even when -o dax is specified. Is that > possible? Not with this patch set. And I'm not sure how that would work. The idea was that -o dax was simply an override for users who were used to having their entire FS be dax. We wanted to depreciate the use of "-o dax" in general. The individual settings are saved so I don't think it makes sense to ignore the -o dax in favor of those settings. Basically that would IMO make the -o dax useless. Ira