Re: [PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Johannes Thumshirn
On Wed, Sep 14, 2016 at 11:56:13AM +0200, Christoph Hellwig wrote: > DAX support for block devices was removed in commits 03cdad > ("block: disable block device DAX by default") and 99a01cd > ("block: remove BLK_DEV_DAX config option"), but we still kept a call to > dax_do_io and some uneeded

Re: [PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Dan Williams
On Wed, Sep 14, 2016 at 2:56 AM, Christoph Hellwig wrote: > DAX support for block devices was removed in commits 03cdad > ("block: disable block device DAX by default") and 99a01cd > ("block: remove BLK_DEV_DAX config option"), but we still kept a call to > dax_do_io and some uneeded

Re: [PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Jens Axboe
On 09/14/2016 03:56 AM, Christoph Hellwig wrote: DAX support for block devices was removed in commits 03cdad ("block: disable block device DAX by default") and 99a01cd ("block: remove BLK_DEV_DAX config option"), but we still kept a call to dax_do_io and some uneeded i_flags manipulations

Re: [PATCH 05/12] dax: provide an iomap based dax read/write path

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 12:01:24PM +0200, Christoph Hellwig wrote: > This is a much simpler implementation of the DAX read/write path that makes > use of the iomap infrastructure. It does not try to mirror the direct I/O > calling conventions and thus doesn't have to deal with i_dio_count or the

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 09:19:10AM +0200, Christoph Hellwig wrote: > On Tue, Sep 13, 2016 at 05:10:39PM -0600, Ross Zwisler wrote: > > If you stick a space in front of the labels (as is done in the rest of > > dax.c) > > it prevents future patches from using them at the beginning of hunks. > >

Re: [PATCH 06/12] dax: provide an iomap based fault handler

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 12:01:25PM +0200, Christoph Hellwig wrote: > Very similar to the existing dax_fault function, but instead of using > the get_block callback we rely on the iomap_ops vector from iomap.c. > That also avoids having to do two calls into the file system for write > faults. > >

Re: [PATCH 10/12] xfs: use iomap to implement DAX

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 12:01:29PM +0200, Christoph Hellwig wrote: > Another users of buffer_heads bytes the dust. > > Signed-off-by: Christoph Hellwig > --- > fs/xfs/xfs_file.c | 61 > +++--- > fs/xfs/xfs_iomap.c | 11 ++ >

Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps)

2016-09-14 Thread Nicholas Piggin
On Wed, 14 Sep 2016 17:39:02 +1000 Dave Chinner wrote: > On Tue, Sep 13, 2016 at 11:53:11AM +1000, Nicholas Piggin wrote: > > On Tue, 13 Sep 2016 07:34:36 +1000 > > Dave Chinner wrote: > > But let me understand your example in the absence of that. > >

Re: [ndctl PATCH v2 2/4] libndctl: record dsm family in add_dimm()

2016-09-14 Thread Dan Williams
On Tue, Sep 13, 2016 at 10:41 AM, Brian Boylston wrote: > The recorded DSM family can be used to provide family-specific > functionality. > > Cc: Dan Williams > Signed-off-by: Brian Boylston > --- > ndctl/lib/libndctl.c

Re: [PATCH 01/10] iomap: add IOMAP_F_NEW flag

2016-09-14 Thread Christoph Hellwig
On Tue, Sep 13, 2016 at 04:43:57PM -0600, Ross Zwisler wrote: > On Fri, Sep 09, 2016 at 06:34:35PM +0200, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig > > Reviewed-by: Ross Zwisler > > Though I guess I've never seen a patch with a

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Christoph Hellwig
On Tue, Sep 13, 2016 at 09:51:26AM -0600, Ross Zwisler wrote: > I'm working on this right now. I expect that most/all of the infrastructure > between the bh+get_block_t version and the iomap version to be shared, it'll > just be a matter of having a PMD version of the iomap fault handler. This >

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Christoph Hellwig
On Tue, Sep 13, 2016 at 05:10:39PM -0600, Ross Zwisler wrote: > If you stick a space in front of the labels (as is done in the rest of dax.c) > it prevents future patches from using them at the beginning of hunks. Here's > a > patch adding a random space as an example: The spaces in front of

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 09:06:33AM +0200, Christoph Hellwig wrote: > So let's do iomap first. I've got stable ext2 support, as well as support > for the block device, although I'm not sure what the proper testing > protocol for that is. Well, turns out DAX on block devices actually is dead

[PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Christoph Hellwig
DAX support for block devices was removed in commits 03cdad ("block: disable block device DAX by default") and 99a01cd ("block: remove BLK_DEV_DAX config option"), but we still kept a call to dax_do_io and some uneeded i_flags manipulations introduced in commit bbab37 ("block: Add support for DAX

[PATCH 04/12] dax: don't pass buffer_head to copy_user_dax

2016-09-14 Thread Christoph Hellwig
This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/dax.c

[PATCH 03/12] dax: don't pass buffer_head to dax_insert_mapping

2016-09-14 Thread Christoph Hellwig
This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/dax.c

[PATCH 01/12] iomap: add IOMAP_F_NEW flag

2016-09-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler --- fs/xfs/xfs_iomap.c| 2 ++ include/linux/iomap.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index f96c8ff..5d06a2d 100644 ---

[PATCH 08/12] xfs: take the ilock shared if possible in xfs_file_iomap_begin

2016-09-14 Thread Christoph Hellwig
We always just read the extent first, and will later lock exlusively after first dropping the lock in case we actually allocate blocks. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_iomap.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

iomap based DAX path V2

2016-09-14 Thread Christoph Hellwig
This series adds a DAX I/O path based on the iomap interface. This allows more efficient block mapping including defined hole semantics, and is an important step toward getting rid of buffer_heads in XFS. Changes since V1: - added a conversion of ext2 to the iomap interface - addresse feedback

Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps)

2016-09-14 Thread Dave Chinner
On Tue, Sep 13, 2016 at 11:53:11AM +1000, Nicholas Piggin wrote: > On Tue, 13 Sep 2016 07:34:36 +1000 > Dave Chinner wrote: > But let me understand your example in the absence of that. > > - Application mmaps a file, faults in block 0 > - FS allocates block, creates

Re: [PATCH 12/12] ext2: use iomap to implement DAX

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 12:01:31PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig Now that ext2 is using IOMAP, we need to select FS_IOMAP when EXT2_FS is selected else we get a build error: fs/built-in.o: In function `ext2_dax_fault':

Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps)

2016-09-14 Thread Nicholas Piggin
On Thu, 15 Sep 2016 12:31:33 +1000 Dave Chinner wrote: > On Wed, Sep 14, 2016 at 08:19:36PM +1000, Nicholas Piggin wrote: > > On Wed, 14 Sep 2016 17:39:02 +1000 > > Dave Chinner wrote: > > > Ok, looking back over your example, you seem to be

Re: [PATCH 12/12] ext2: use iomap to implement DAX

2016-09-14 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 04:51:05PM -0600, Ross Zwisler wrote: > diff --git a/fs/ext2/Kconfig b/fs/ext2/Kconfig > index c634874e..3391f48 100644 > --- a/fs/ext2/Kconfig > +++ b/fs/ext2/Kconfig > @@ -1,5 +1,6 @@ > config EXT2_FS > tristate "Second extended fs support" > + select FS_IOMAP

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 11:07:59AM -0600, Ross Zwisler wrote: > I'll bite - why do you think adding a space before labels is a "fairly > horrible style"? Adding them gives a tangible benefit for unified diffs and > patches because it's much more useful to know that a change is in a given >

Re: [PATCH 06/12] dax: provide an iomap based fault handler

2016-09-14 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 11:27:17AM -0600, Ross Zwisler wrote: > > + case IOMAP_UNWRITTEN: > > + case IOMAP_HOLE: > > + if (!(vmf->flags & FAULT_FLAG_WRITE)) > > + return dax_load_hole(mapping, entry, vmf); > > + /*FALLTHU*/ > > FALLTHRU

Re: [ndctl PATCH v2 1/4] libndctl: introduce ndctl_smart_ops

2016-09-14 Thread Dan Williams
On Tue, Sep 13, 2016 at 10:41 AM, Brian Boylston wrote: > Add a layer of indirection for the ndctl_cmd_smart*() family of > interfaces. This will allow the underlying implementation to be > switched based on the DSM family supported by the DIMM. > > Cc: Dan Williams

Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps)

2016-09-14 Thread Dave Chinner
On Wed, Sep 14, 2016 at 08:19:36PM +1000, Nicholas Piggin wrote: > On Wed, 14 Sep 2016 17:39:02 +1000 > Dave Chinner wrote: > > Ok, looking back over your example, you seem to be suggesting a new > > page fault behaviour is required from filesystems that has not been > >