From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Cc: boaz@plexistor.com, kirill.shutemov@linux.intel.com
Subject: [PATCH] xfs: add ->pfn_mkwrite support for DAX
Date: Wed, 2 Sep 2015 11:25:00 +1000 [thread overview]
Message-ID: <1441157100-1658-1-git-send-email-david@fromorbit.com> (raw)
From: Dave Chinner <dchinner@redhat.com>
->pfn_mkwrite support is needed so that when a page with allocated
backing store first takes a write fault the timestamps on the
file are updated. THis fixes a generic/080 failure.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_file.c | 11 +++++++++++
fs/xfs/xfs_trace.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index de2c237..26535ba 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1546,10 +1546,21 @@ xfs_filemap_fault(
return ret;
}
+static int
+xfs_filemap_pfn_mkwrite(
+ struct vm_area_struct *vma,
+ struct vm_fault *vmf)
+{
+ trace_xfs_filemap_pfn_mkwrite(XFS_I(file_inode(vma->vm_file)));
+
+ return dax_pfn_mkwrite(vma, vmf);
+}
+
static const struct vm_operations_struct xfs_file_vm_ops = {
.fault = xfs_filemap_fault,
.map_pages = filemap_map_pages,
.page_mkwrite = xfs_filemap_page_mkwrite,
+ .pfn_mkwrite = xfs_filemap_pfn_mkwrite,
};
STATIC int
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 8b5432e..63d87f2 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -688,6 +688,7 @@ DEFINE_INODE_EVENT(xfs_inode_free_eofblocks_invalid);
DEFINE_INODE_EVENT(xfs_filemap_fault);
DEFINE_INODE_EVENT(xfs_filemap_page_mkwrite);
+DEFINE_INODE_EVENT(xfs_filemap_pfn_mkwrite);
DECLARE_EVENT_CLASS(xfs_iref_class,
TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip),
--
2.5.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-09-02 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 1:25 Dave Chinner [this message]
2015-09-02 5:12 ` [PATCH] xfs: add ->pfn_mkwrite support for DAX Christoph Hellwig
2015-09-02 21:34 ` Dave Chinner
2015-09-02 9:23 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441157100-1658-1-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=boaz@plexistor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox