Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-31 Thread Ross Zwisler
On Tue, Oct 31, 2017 at 02:50:01PM -0700, Dan Williams wrote: > On Tue, Oct 31, 2017 at 8:19 AM, Jan Kara wrote: > > On Fri 27-10-17 12:08:34, Jan Kara wrote: > >> On Fri 27-10-17 08:16:11, Dave Chinner wrote: > >> > On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > >> > >

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-31 Thread Dan Williams
On Tue, Oct 31, 2017 at 8:19 AM, Jan Kara wrote: > On Fri 27-10-17 12:08:34, Jan Kara wrote: >> On Fri 27-10-17 08:16:11, Dave Chinner wrote: >> > On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: >> > > > > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c >> > > > >

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-31 Thread Jan Kara
On Fri 27-10-17 12:08:34, Jan Kara wrote: > On Fri 27-10-17 08:16:11, Dave Chinner wrote: > > On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > > > > > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c > > > > > index f179bdf1644d..b43be199fbdf 100644 > > > > > ---

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-27 Thread Jan Kara
On Fri 27-10-17 08:16:11, Dave Chinner wrote: > On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > > > > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c > > > > index f179bdf1644d..b43be199fbdf 100644 > > > > --- a/fs/xfs/xfs_iomap.c > > > > +++ b/fs/xfs/xfs_iomap.c > > > > @@ -33,6

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-27 Thread Jan Kara
On Fri 27-10-17 08:43:01, Christoph Hellwig wrote: > On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > > But now that I look at XFS implementation again, it misses handling > > of VM_FAULT_NEEDSYNC in xfs_filemap_pfn_mkwrite() (ext4 gets this right). > > I'll fix this by using

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-26 Thread Dave Chinner
On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > On Wed 25-10-17 09:23:22, Dave Chinner wrote: > > On Tue, Oct 24, 2017 at 05:24:14PM +0200, Jan Kara wrote: > > > From: Christoph Hellwig > > > > > > Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare >

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-26 Thread Jan Kara
On Wed 25-10-17 09:23:22, Dave Chinner wrote: > On Tue, Oct 24, 2017 at 05:24:14PM +0200, Jan Kara wrote: > > From: Christoph Hellwig > > > > Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare > > blocks for writing and the inode is pinned, and has dirty fields

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-24 Thread Dave Chinner
On Tue, Oct 24, 2017 at 05:24:14PM +0200, Jan Kara wrote: > From: Christoph Hellwig > > Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare > blocks for writing and the inode is pinned, and has dirty fields other > than the timestamps. That's "fdatasync dirty",

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-24 Thread Ross Zwisler
On Tue, Oct 24, 2017 at 05:24:14PM +0200, Jan Kara wrote: > From: Christoph Hellwig > > Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare > blocks for writing and the inode is pinned, and has dirty fields other > than the timestamps. In __xfs_filemap_fault() we

[PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-24 Thread Jan Kara
From: Christoph Hellwig Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare blocks for writing and the inode is pinned, and has dirty fields other than the timestamps. In __xfs_filemap_fault() we then detect this case and call dax_finish_sync_fault() to make sure

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-19 Thread Christoph Hellwig
> +#define XFS_MAP_SUPPORTED (LEGACY_MAP_MASK | MAP_SYNC) I'd kill this define. Also is there any good reason that we have to add LEGACY_MAP_MASK instead of assuming it's supported in the core? > #endif > .mmap = xfs_file_mmap, > + .mmap_supported_flags =

[PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-19 Thread Jan Kara
From: Christoph Hellwig Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare blocks for writing and the inode is pinned, and has dirty fields other than the timestamps. In __xfs_filemap_fault() we then detect this case and call dax_finish_sync_fault() to make sure