lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 17:06:10 -0500
From:   Jeff Moyer <jmoyer@...hat.com>
To:     Ira Weiny <ira.weiny@...el.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Dave Chinner <david@...morbit.com>,
        Christoph Hellwig <hch@....de>,
        "Theodore Y. Ts'o" <tytso@....edu>, Jan Kara <jack@...e.cz>,
        linux-ext4 <linux-ext4@...r.kernel.org>,
        linux-xfs <linux-xfs@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v3 00/12] Enable per-file/directory DAX operations V3

Ira Weiny <ira.weiny@...el.com> writes:

> On Fri, Feb 14, 2020 at 04:23:19PM -0500, Jeff Moyer wrote:
>> Ira Weiny <ira.weiny@...el.com> writes:
>> 
>> > [disclaimer: the following assumes the underlying 'device' (superblock)
>> > supports DAX]
>> >
>> > ... which results in S_DAX == false when the file is opened without the mount
>> > option.  The key would be that all directories/files created under a root with
>> > XFS_DIFLAG2_DAX == true would inherit their flag and be XFS_DIFLAG2_DAX == true
>> > all the way down the tree.  Any file not wanting DAX would need to set
>> > XFS_DIFLAG2_DAX == false.  And setting false could be used on a directory to
>> > allow a user or group to not use dax on files in that sub-tree.
>> >
>> > Then without '-o dax' (XFS_MOUNT_DAX == false) all files when opened set S_DAX
>> > equal to XFS_DIFLAG2_DAX value.  (Directories, as of V4, never get S_DAX set.)
>> >
>> > If '-o dax' (XFS_MOUNT_DAX == true) then S_DAX is set on all files.
>> 
>> One more clarifying question.  Let's say I set XFS_DIFLAG2_DAX on an
>> inode.  I then open the file, and perform mmap/load/store/etc.  I close
>> the file, and I unset XFS_DIFLAG2_DAX.  Will the next open treat the
>> file as S_DAX or not?  My guess is the inode won't be evicted, and so
>> S_DAX will remain set.
>
> The inode will not be evicted, or even it happens to be xfs_io will reload it
> to unset the XFS_DIFLAG2_DAX flag.  And the S_DAX flag changes _with_ the
> XFS_DIFLAG2_DAX change when it can (when the underlying storage supports
> S_DAX).

OK, so it will be possible to change the effective mode.

I'll try to get some testing in on this series, now.

Thanks!
Jeff

Powered by blists - more mailing lists