Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1286791
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 6/7] ext4: call dax_pfn_mkwrite() for DAX fsync/msync |
| Date | 2015-12-08 20:20 +0100 |
| Message-ID | <qDvXQ-6mP-33@gated-at.bofh.it> (permalink) |
| References | <qDvXP-6mP-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
fs/ext4/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 749b222..8c8965c 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -291,8 +291,8 @@ static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma,
{
struct inode *inode = file_inode(vma->vm_file);
struct super_block *sb = inode->i_sb;
- int ret = VM_FAULT_NOPAGE;
loff_t size;
+ int ret;
sb_start_pagefault(sb);
file_update_time(vma->vm_file);
@@ -300,6 +300,8 @@ static int ext4_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(&EXT4_I(inode)->i_mmap_sem);
sb_end_pagefault(sb);
--
2.5.0
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/7] DAX fsync/msync support Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:20 +0100
[PATCH v3 7/7] xfs: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:20 +0100
[PATCH v3 6/7] ext4: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:20 +0100
[PATCH v3 3/7] mm: add find_get_entries_tag() Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:30 +0100
Re: [PATCH v3 3/7] mm: add find_get_entries_tag() Dan Williams <dan.j.williams@gmail.com> - 2015-12-09 20:50 +0100
Re: [PATCH v3 3/7] mm: add find_get_entries_tag() Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-10 21:30 +0100
Re: [PATCH v3 3/7] mm: add find_get_entries_tag() Dan Williams <dan.j.williams@intel.com> - 2015-12-10 21:40 +0100
[PATCH v3 5/7] ext2: call dax_pfn_mkwrite() for DAX fsync/msync Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:30 +0100
[PATCH v3 2/7] dax: support dirty DAX entries in radix tree Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:30 +0100
[PATCH v3 1/7] pmem: add wb_cache_pmem() to the PMEM API Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-08 20:30 +0100
csiph-web