Skip to contentSkip to conversation

vfs: improve DAX behavior for 5.8, part 1

GIT PULL Merged Darrick J. Wong 3 participants 3 messages Jun 2, 2020 – Jun 3, 2020 VFS

lore
Share & tools
lore
#0 lore raw

Hi Linus,

After many years of LKML-wrangling about how to enable programs to query and influence the file data access mode (DAX) when a filesystem resides on storage devices such as persistent memory, Ira Weiny has emerged with a proposed set of standard behaviors that has not been shot down by anyone! We're more or less standardizing on the current XFS behavior and adapting ext4 to do the same.

This pull request is the first of a handful that will make ext4 and XFS present a consistent interface for user programs that care about DAX. We add a statx attribute that programs can check to see if DAX is enabled on a particular file. Then, we update the DAX documentation to spell out the user-visible behaviors that filesystems will guarantee (until the next storage industry shakeup). The on-disk inode flag has been in XFS for a few years now.

Note that Stephen Rothwell reported a minor merge conflict[1] between the first cleanup patch and a different change in the block layer. The resolution looks pretty straightforward, but let me know if you encounter problems.

--D

[1] https://lore.kernel.org/linux-next/[email protected]/

The following changes since commit 0e698dfa282211e414076f9dc7e83c1c288314fd:

Linux 5.7-rc4 (2020-05-03 14:56:04 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.8-merge-1

for you to fetch changes up to 83d9088659e8f113741bb197324bd9554d159657:

Documentation/dax: Update Usage section (2020-05-04 08:49:39 -0700)

----------------------------------------------------------------
New code for 5.8:
- Clean up io_is_direct.
- Add a new statx flag to indicate when file data access is being done via DAX (as opposed to the page cache).
- Update the documentation for how system administrators and application programmers can take advantage of the (still experimental DAX) feature.

----------------------------------------------------------------
Ira Weiny (3):
fs: Remove unneeded IS_DAX() check in io_is_direct() fs/stat: Define DAX statx attribute Documentation/dax: Update Usage section

 Documentation/filesystems/dax.txt | 142 +++++++++++++++++++++++++++++++++++++-
 drivers/block/loop.c              |   6 +-
 fs/stat.c                         |   3 +
 include/linux/fs.h                |   7 +-
 include/uapi/linux/stat.h         |   1 +
 5 files changed, 147 insertions(+), 12 deletions(-)
#1 lore raw
Quoted 8 lines · Darrick J. Wong

Hi Linus,

After many years of LKML-wrangling about how to enable programs to query and influence the file data access mode (DAX) when a filesystem resides on storage devices such as persistent memory, Ira Weiny has emerged with a proposed set of standard behaviors that has not been shot down by anyone! We're more or less standardizing on the current XFS behavior and adapting ext4 to do the same.

Also, for those interested: The corresponding man page change mentioned in the commit has been submitted here:

https://lore.kernel.org/lkml/[email protected]/

Ira

Quoted 50 lines

This pull request is the first of a handful that will make ext4 and XFS present a consistent interface for user programs that care about DAX. We add a statx attribute that programs can check to see if DAX is enabled on a particular file. Then, we update the DAX documentation to spell out the user-visible behaviors that filesystems will guarantee (until the next storage industry shakeup). The on-disk inode flag has been in XFS for a few years now.

Note that Stephen Rothwell reported a minor merge conflict[1] between the first cleanup patch and a different change in the block layer. The resolution looks pretty straightforward, but let me know if you encounter problems.

--D

[1] https://lore.kernel.org/linux-next/[email protected]/

The following changes since commit 0e698dfa282211e414076f9dc7e83c1c288314fd:

Linux 5.7-rc4 (2020-05-03 14:56:04 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.8-merge-1

for you to fetch changes up to 83d9088659e8f113741bb197324bd9554d159657:

Documentation/dax: Update Usage section (2020-05-04 08:49:39 -0700)

----------------------------------------------------------------
New code for 5.8:
- Clean up io_is_direct.
- Add a new statx flag to indicate when file data access is being done via DAX (as opposed to the page cache).
- Update the documentation for how system administrators and application programmers can take advantage of the (still experimental DAX) feature.

----------------------------------------------------------------
Ira Weiny (3):
fs: Remove unneeded IS_DAX() check in io_is_direct() fs/stat: Define DAX statx attribute Documentation/dax: Update Usage section

 Documentation/filesystems/dax.txt | 142 +++++++++++++++++++++++++++++++++++++-
 drivers/block/loop.c              |   6 +-
 fs/stat.c                         |   3 +
 include/linux/fs.h                |   7 +-
 include/uapi/linux/stat.h         |   1 +
 5 files changed, 147 insertions(+), 12 deletions(-)
merge bot Merged
#2 lore raw
In reply to Darrick J. Wong
The pull request you sent on Tue, 2 Jun 2020 09:58:52 -0700:

The pull request you sent on Tue, 2 Jun 2020 09:58:52 -0700:

Quoted 1 line

git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.8-merge-1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/dae2f8ed7992e88c8d62c54e8295ffc8475b4a80

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker