Re: [PATCH v3 00/12] Enable per-file/directory DAX operations V3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 12, 2020 at 02:49:48PM -0500, Jeff Moyer wrote:
> Ira Weiny <ira.weiny@xxxxxxxxx> 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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux