Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297603

[PATCH v6 5/7] ext2: call dax_pfn_mkwrite() for DAX fsync/msync

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v6 5/7] ext2: call dax_pfn_mkwrite() for DAX fsync/msync
Date 2015-12-23 20:50 +0100
Message-ID <qIXA6-5kL-9@gated-at.bofh.it> (permalink)
References <qIXqq-5hs-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


To properly support the new DAX fsync/msync infrastructure filesystems
need to call dax_pfn_mkwrite() so that DAX can track when user pages are
dirtied.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
 fs/ext2/file.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index 11a42c5..2c88d68 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -102,8 +102,8 @@ static int ext2_dax_pfn_mkwrite(struct vm_area_struct *vma,
 {
 	struct inode *inode = file_inode(vma->vm_file);
 	struct ext2_inode_info *ei = EXT2_I(inode);
-	int ret = VM_FAULT_NOPAGE;
 	loff_t size;
+	int ret;
 
 	sb_start_pagefault(inode->i_sb);
 	file_update_time(vma->vm_file);
@@ -113,6 +113,8 @@ static int ext2_dax_pfn_mkwrite(struct vm_area_struct *vma,
 	size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	if (vmf->pgoff >= size)
 		ret = VM_FAULT_SIGBUS;
+	else
+		ret = dax_pfn_mkwrite(vma, vmf);
 
 	up_read(&ei->dax_sem);
 	sb_end_pagefault(inode->i_sb);
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/7] DAX fsync/msync support Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:40 +0100
  [PATCH v6 6/7] ext4: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100
  [PATCH v6 5/7] ext2: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100
  [PATCH v6 7/7] xfs: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100
  [PATCH v6 3/7] mm: add find_get_entries_tag() Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100
    RE: [PATCH v6 3/7] mm: add find_get_entries_tag() "Elliott, Robert (Persistent Memory)" <elliott@hpe.com> - 2015-12-24 01:30 +0100
  [PATCH v6 2/7] dax: support dirty DAX entries in radix tree Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100
    Re: [PATCH v6 2/7] dax: support dirty DAX entries in radix tree Bob Liu <bob.liu@oracle.com> - 2015-12-30 09:10 +0100
      Re: [PATCH v6 2/7] dax: support dirty DAX entries in radix tree Dan Williams <dan.j.williams@intel.com> - 2015-12-30 21:40 +0100
        Re: [PATCH v6 2/7] dax: support dirty DAX entries in radix tree Bob Liu <bob.liu@oracle.com> - 2015-12-31 04:30 +0100
          Re: [PATCH v6 2/7] dax: support dirty DAX entries in radix tree Dan Williams <dan.j.williams@intel.com> - 2015-12-31 23:10 +0100
  [PATCH v6 4/7] dax: add support for fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-23 20:50 +0100

csiph-web