public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: add ->pfn_mkwrite support for DAX
@ 2015-09-02  1:25 Dave Chinner
  2015-09-02  5:12 ` Christoph Hellwig
  2015-09-02  9:23 ` Boaz Harrosh
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Chinner @ 2015-09-02  1:25 UTC (permalink / raw)
  To: xfs; +Cc: boaz, kirill.shutemov

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: add ->pfn_mkwrite support for DAX
  2015-09-02  1:25 [PATCH] xfs: add ->pfn_mkwrite support for DAX Dave Chinner
@ 2015-09-02  5:12 ` Christoph Hellwig
  2015-09-02 21:34   ` Dave Chinner
  2015-09-02  9:23 ` Boaz Harrosh
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2015-09-02  5:12 UTC (permalink / raw)
  To: Dave Chinner; +Cc: boaz, kirill.shutemov, xfs

On Wed, Sep 02, 2015 at 11:25:00AM +1000, Dave Chinner wrote:
> 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.

Shouldn't you be able to drop the call to xfs_filemap_page_mkwrite from
xfs_filemap_fault now?

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: add ->pfn_mkwrite support for DAX
  2015-09-02  1:25 [PATCH] xfs: add ->pfn_mkwrite support for DAX Dave Chinner
  2015-09-02  5:12 ` Christoph Hellwig
@ 2015-09-02  9:23 ` Boaz Harrosh
  1 sibling, 0 replies; 4+ messages in thread
From: Boaz Harrosh @ 2015-09-02  9:23 UTC (permalink / raw)
  To: Dave Chinner, xfs; +Cc: kirill.shutemov

On 09/02/2015 04:25 AM, Dave Chinner wrote:
> 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>

Reviewed-by: Boaz Harrosh <boaz@plexistor.com>

I made a patch for this yesterday, but yours is better of-course
I feel guilty because I sent the patch for the pfn_mkwrite thing,
at the time xfs-dax was not yet in, but I forgot all about it when
reviewing the xfs-dax. My bad, sorry.

Thanks Dave
Boaz

> ---
>  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),
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: add ->pfn_mkwrite support for DAX
  2015-09-02  5:12 ` Christoph Hellwig
@ 2015-09-02 21:34   ` Dave Chinner
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2015-09-02 21:34 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: boaz, kirill.shutemov, xfs

On Tue, Sep 01, 2015 at 10:12:17PM -0700, Christoph Hellwig wrote:
> On Wed, Sep 02, 2015 at 11:25:00AM +1000, Dave Chinner wrote:
> > 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.
> 
> Shouldn't you be able to drop the call to xfs_filemap_page_mkwrite from
> xfs_filemap_fault now?

No idea. It hasn't been removed from dax_fault, so I'm not going to
remove it from xfs_filemap_page_mkwrite()...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-02 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02  1:25 [PATCH] xfs: add ->pfn_mkwrite support for DAX Dave Chinner
2015-09-02  5:12 ` Christoph Hellwig
2015-09-02 21:34   ` Dave Chinner
2015-09-02  9:23 ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox