[PATCH 3/8] xfs: remove s_maxbytes enforcement in xfs_file_read_iter

2016-06-22 Thread Christoph Hellwig
All the three low-level read implementations that we might call already take care of not overflowing the maximum supported bytes, no need to duplicate it here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 8 1 file changed, 8 deletions(-) diff --git a/

[PATCH 1/8] xfs: don't pass ioflags around in the ioctl path

2016-06-22 Thread Christoph Hellwig
Instead check the file pointer for the invisble I/O flag directly, and use the chance to drop redundant arguments from the xfs_ioc_space prototype. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_ioctl.c | 22 -- fs/xfs/xfs_ioctl.h | 3 ---

[PATCH 2/8] xfs: kill ioflags

2016-06-22 Thread Christoph Hellwig
a long time ago. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 26 +- fs/xfs/xfs_inode.h | 10 -- fs/xfs/xfs_trace.h | 19 --- 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/fs/xfs/xfs_file.c b/

[PATCH 4/8] xfs: split xfs_file_read_iter into buffered and direct I/O helpers

2016-06-22 Thread Christoph Hellwig
Similar to what we did on the write side a while ago. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 83 ++- 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c

[PATCH 8/8] xfs: fix locking for DAX writes

2016-06-22 Thread Christoph Hellwig
transparently enable on applications without any knowledge of it we can't simply drop the requirement. Even worse this only happens for aligned writes and thus doesn't show up for many typical use cases. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 20 +---

xfs: untangle the direct I/O and DAX path, fix DAX locking

2016-06-22 Thread Christoph Hellwig
The last patch is what started the series: XFS currently uses the direct I/O locking strategy for DAX because DAX was overloaded onto the direct I/O path. For XFS this means that we only take a shared inode lock instead of the normal exclusive one for writes IFF they are properly aligned. While

[PATCH 5/8] xfs: stop using generic_file_read_iter for direct I/O

2016-06-22 Thread Christoph Hellwig
of the buffered I/O fallback that isn't used for XFS. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e584333..f761f49 100644 --- a/fs/xfs/xfs_

[PATCH 7/8] xfs: split direct I/O and DAX path

2016-06-22 Thread Christoph Hellwig
So far the DAX code overloaded the direct I/O code path. There is very little in common between the two, and untangling them allows to clean up both variants. As a ѕide effect we also get separate trace points for both I/O types. Signed-off-by: Christoph Hellwig <h...@lst.de> ---

Re: xfs: untangle the direct I/O and DAX path, fix DAX locking

2016-06-24 Thread Christoph Hellwig
On Fri, Jun 24, 2016 at 05:13:18PM +1000, Dave Chinner wrote: > This is a POSIX compliant fsync() implementation: > > int fsync(int fd) > { > return 0; > } Depends on what you mean with "Posix". Modern Posix which includex XPG has the _POSIX_SYNCHRONIZED_IO option, which Linux implements.

Re: [PATCH v5 4/5] block: convert to device_add_disk()

2016-06-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: Subtle races between DAX mmap fault and write path

2016-08-08 Thread Christoph Hellwig
On Mon, Aug 08, 2016 at 12:30:18PM +, Boylston, Brian wrote: > I used NVML 1.1 for the measurements. In this version and with the hardware > that I used, the pmem_persist() flow is: Please don't use crap like NVML, given that the people behind it don't seem to understand persistency at all.

Re: [RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-02-01 Thread Christoph Hellwig
On Mon, Jan 30, 2017 at 10:16:29AM -0800, Dan Williams wrote: > Ok, now that dax_map_atomic() is gone, it's much easier to remove > struct blk_dax_ctl. > > We can also move the partition alignment checks to be a one-time check > at bdev_dax_capable() time and kill bdev_dax_direct_access() in

Re: [RFC PATCH 13/17] fs: update mount_bdev() to lookup dax infrastructure

2017-02-01 Thread Christoph Hellwig
On Mon, Jan 30, 2017 at 10:29:12AM -0800, Dan Williams wrote: > On Mon, Jan 30, 2017 at 4:26 AM, Christoph Hellwig <h...@lst.de> wrote: > > On Sat, Jan 28, 2017 at 12:37:14AM -0800, Dan Williams wrote: > >> This is in preparation for removing the ->

Re: [RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-02-01 Thread Christoph Hellwig
On Wed, Feb 01, 2017 at 01:21:40AM -0800, Dan Williams wrote: > > In/Out parameters are always a bit problematic in terms of API clarity. > > And updating a device-relative address with an absolute physical one > > sounds like an odd API for sure. > > Yes, it does, and I thought better of it

Re: [PATCH 1/2] ext4: fix DAX write locking

2017-02-08 Thread Christoph Hellwig
On Wed, Jan 11, 2017 at 10:01:36AM +0100, Jan Kara wrote: > On Tue 10-01-17 16:48:07, Christoph Hellwig wrote: > > Unlike O_DIRECT DAX is not an optional opt-in feature selected by the > > application, so we'll have to provide the traditional synchronіzation > > of overla

Re: [PATCH] mm: replace FAULT_FLAG_SIZE with parameter to huge_fault

2017-02-06 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 02:31:22PM -0700, Dave Jiang wrote: > Since the introduction of FAULT_FLAG_SIZE to the vm_fault flag, it has > been somewhat painful with getting the flags set and removed at the > correct locations. More than one kernel oops was introduced due to > difficulties of getting

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-22 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 06:19:24PM +, Matthew Wilcox wrote: > No, I mean a network filesystem like 9p or cifs or nfs. If the memcpy > is supposed to be performed by the backing device struct backing_dev has no relation to the DAX code. Even more so what's the point of doing a DAXish memcpy

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-22 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 03:43:09PM +, Matthew Wilcox wrote: > In the case of a network filesystem being used to communicate with > a different VM on the same physical machine, there is no backing > device, just a network protocol. Again, do you mean block device? For a filesystem that does

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-22 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 06:39:28PM +, Matthew Wilcox wrote: > Two guests on the same physical machine (or a guest and a host) have access > to the same set of physical addresses. This might be an NV-DIMM, or it might > just be DRAM (for the purposes of reducing guest overhead). The network

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-21 Thread Christoph Hellwig
On Sat, Jan 21, 2017 at 04:28:52PM +, Matthew Wilcox wrote: > Of course, there may not be a backing device either! s/backing device/block device/ ? If so fully agreed. I like the dax_ops scheme, but we should go all the way and detangle it from the block device. I already brought up this

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Mon, Jan 23, 2017 at 06:37:18AM +, Matthew Wilcox wrote: > Wow, DAX devices look painful and awful. I certainly don't want to be > exposing the memory fronted by my network filesystem to userspace to > access. That just seems like a world of pain and bad experiences. So what is your

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 09:30:23AM -0800, Dan Williams wrote: > So are you saying we need a way to go from a block_device inode to a > dax_device inode and then look up the dax_operations from there? > > A filesystem, if it so chooses, could mount on top of the dax_device > inode directly?

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 11:10:04PM -0800, Dan Williams wrote: > How about we solve the copy_from_user() abuse first before we hijack > this thread for some future feature that afaics has no patches posted > yet. Solving copy_from_user abuse first sounds perfectly fine to me. But please do so

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-26 Thread Christoph Hellwig
On Thu, Jan 26, 2017 at 11:06:53AM +0100, Jan Kara wrote: > Yeah, so my patches (and I suspect your as well), have a problem when the > backing_device_info stays around because blkdev inode still exists, device > gets removed (e.g. USB disk gets unplugged) but blkdev inode still stays > around

Re: [RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-01-30 Thread Christoph Hellwig
On Sat, Jan 28, 2017 at 12:36:58AM -0800, Dan Williams wrote: > Provide a replacement for bdev_direct_access() that uses > dax_operations.direct_access() instead of > block_device_operations.direct_access(). Once all consumers of the old > api have been converted bdev_direct_access() will be

Re: [RFC PATCH 13/17] fs: update mount_bdev() to lookup dax infrastructure

2017-01-30 Thread Christoph Hellwig
On Sat, Jan 28, 2017 at 12:37:14AM -0800, Dan Williams wrote: > This is in preparation for removing the ->direct_access() method from > block_device_operations. I don't think mount_bdev has any business knowing about DAX. Just call dax_get_by_host manually from the affected file systems for now,

Re: [RFC PATCH 01/17] dax: refactor dax-fs into a generic provider of dax inodes

2017-01-30 Thread Christoph Hellwig
I really don't like the dax_inode name. Why not something like dax_device or dax_region? ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Mon, Jan 23, 2017 at 09:14:04AM -0800, Dan Williams wrote: > The use case that we have now is distinguishing volatile vs persistent > memory (brd vs pmem). brd is a development tool, so until we have other reasons for this abstraction (which I'm pretty sure will show up rather sooner than

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-17 Thread Christoph Hellwig
On Tue, Jan 17, 2017 at 03:37:03PM +0100, Jan Kara wrote: > Well, the situation with NVM is more like with DRAM AFAIU. It is quite > reliable but given the size the probability *some* cell has degraded is > quite high. And similar to DRAM you'll get MCE (Machine Check Exception) > when you try to

Re: [LSF/MM TOPIC] Future direction of DAX

2017-01-17 Thread Christoph Hellwig
On Tue, Jan 17, 2017 at 09:54:27AM -0500, Jeff Moyer wrote: > I spoke with Dave before the holidays, and he indicated that > PMEM_IMMUTABLE would be an acceptable solution to allowing applications > to flush data completely from userspace. I know this subject has been > beaten to death, but would

Re: [LSF/MM TOPIC] Future direction of DAX

2017-01-16 Thread Christoph Hellwig
On Mon, Jan 16, 2017 at 05:50:33PM -0800, Darrick J. Wong wrote: > I wouldn't consider it a barrier in general (since ext4 also prints > EXPERIMENTAL warnings for DAX), merely one for XFS. I don't even think > it's that big of a hurdle -- afaict XFS ought to be able to achieve this > by modifying

Re: [4.8 hang] xfstests generic/361 hangs on dax enabled filesystems

2016-08-04 Thread Christoph Hellwig
Just send a fix that you're Cc'ed on. But now xfs/049 hangs, although only on pmem devices, loop on non-pmem seems to be fine. 4.7 was fine as well. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-08-25 Thread Christoph Hellwig
Hi Ross, can you take at my (fully working, but not fully cleaned up) version of the iomap based DAX code here: http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/iomap-dax By using iomap we don't even have the size hole problem and totally get out of the reverse-engineer what

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-08-30 Thread Christoph Hellwig
On Mon, Aug 29, 2016 at 08:57:41AM -0400, Theodore Ts'o wrote: > It's been on my todo list. The only reason why I haven't done it yet > is because I knew you were working on a solution, and I didn't want to > do things one way for buffered I/O, and a different way for Direct > I/O, and

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

2016-09-09 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 <h...@lst.de> --- fs/xfs/xfs_iomap.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/

[PATCH 07/10] xfs: fix locking for DAX writes

2016-09-09 Thread Christoph Hellwig
transparently enable on applications without any knowledge of it we can't simply drop the requirement. Even worse this only happens for aligned writes and thus doesn't show up for many typical use cases. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 20 +---

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

2016-09-09 Thread Christoph Hellwig
This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 993dc6f..98463bb 100644 --- a/fs/dax.c ++

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

2016-09-09 Thread Christoph Hellwig
Another users of buffer_heads bytes the dust. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 44 +++- fs/xfs/xfs_iomap.c | 11 +++ 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/fs/xfs/xfs_file.c b/

[PATCH 09/10] xfs: refactor xfs_setfilesize

2016-09-09 Thread Christoph Hellwig
Rename the current function to __xfs_setfilesize and add a non-static wrapper that also takes care of creating the transaction. This new helper will be used by the new iomap-based DAX path. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_aops.

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

2016-09-09 Thread Christoph Hellwig
completion to the caller. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/dax.c | 103 ++ include/linux/iomap.h | 2 + 2 files changed, 105 insertions(+) diff --git a/fs/dax.c b/fs/dax.c index 84343ce..57ad456 100644 --

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

2016-09-11 Thread Christoph Hellwig
On Thu, Sep 08, 2016 at 04:56:36PM -0600, Ross Zwisler wrote: > I think this goes back to our previous discussion about support for the PMEM > programming model. Really I think what NVML needs isn't a way to tell if it > is getting a DAX mapping, but whether it is getting a DAX mapping on a >

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

2016-09-12 Thread Christoph Hellwig
On Mon, Sep 12, 2016 at 05:25:15PM +1000, Oliver O'Halloran wrote: > What are the problems here? Is this a matter of existing filesystems > being unable/unwilling to support this or is it just fundamentally > broken? It's a fundamentally broken model. See Dave's post that actually was sent

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-11 Thread Christoph Hellwig
On Sat, Sep 10, 2016 at 07:52:53AM +, Matthew Wilcox wrote: > DAX code over to using iomap requires converting all of ext2 away from > buffer_head; are you saying he's wrong? Not sure if he's really saying that, but it's wrong for sure. Just to prove that I came up with a working ext2 iomap

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-10 Thread Christoph Hellwig
On Fri, Sep 09, 2016 at 03:34:43PM -0700, Dan Williams wrote: > I agree with you that continuing to touch ext2 is not a good idea, but > I'm not yet convinced that now is the time to go do dax-2.0 when we > haven't finished shipping dax-1.0. I've mentioned this before, but I'd like to repeat it.

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-10 Thread Christoph Hellwig
The mail is basically unparsable (hint: you can use a sane mailer even with exchange servers :)). Either way we need to get rid of buffer_heads, and another aop that is entirely caller specific is unaceptable. That being said your idea doesn't sounds unreasonable, but will require a bit more

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

2016-09-10 Thread Christoph Hellwig
On Sat, Sep 10, 2016 at 08:55:57AM +1000, Dave Chinner wrote: > THe errors from the above two cases are not acted on. they are > immediately overwritten by: Yes, Robert also pointed this out. Fix below. > Is there a missing "if (error) goto out;" check somewhere here? Just the one above. >

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-10 Thread Christoph Hellwig
On Sat, Sep 10, 2016 at 07:33:18AM +, Matthew Wilcox wrote: > > caller specific is unaceptable. That being said your idea doesn't sounds > > unreasonable, but will require a bit more work and has no real short-term > > need. > > So your proposal is to remove buffer_heads from ext2? No, the

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 <h...@lst.de> > > Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> > > Thoug

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 actuall

[PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Christoph Hellwig
lock: Add support for DAX reads/writes to block devices"). Remove those leftovers. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/block_dev.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index c3cdde8..45f5491

[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 <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/f

[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 <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/f

[PATCH 01/12] iomap: add IOMAP_F_NEW flag

2016-09-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- 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 12/12] ext2: use iomap to implement DAX

2016-09-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ext2/ext2.h | 1 + fs/ext2/file.c | 72 +++-- fs/ext2/inode.c | 63 ++ 3 files changed, 124 insertions(+), 12 deletions(-) diff --gi

[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 <h...@lst.de> --- fs/xfs/xfs_iomap.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/

[PATCH 09/12] xfs: refactor xfs_setfilesize

2016-09-14 Thread Christoph Hellwig
Rename the current function to __xfs_setfilesize and add a non-static wrapper that also takes care of creating the transaction. This new helper will be used by the new iomap-based DAX path. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_aops.

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

2016-09-14 Thread Christoph Hellwig
Another users of buffer_heads bytes the dust. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 61 +++--- fs/xfs/xfs_iomap.c | 11 ++ 2 files changed, 24 insertions(+), 48 deletions(-) diff --git a/fs/xfs/xfs_

[PATCH 07/12] xfs: fix locking for DAX writes

2016-09-14 Thread Christoph Hellwig
transparently enable on applications without any knowledge of it we can't simply drop the requirement. Even worse this only happens for aligned writes and thus doesn't show up for many typical use cases. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 20 +---

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

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

2016-09-14 Thread Christoph Hellwig
completion to the caller. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/dax.c| 114 include/linux/dax.h | 4 ++ 2 files changed, 118 insertions(+) diff --git a/fs/dax.c b/fs/dax.c index 84343ce..1f9f2d4 100644 --- a/fs

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

2016-09-14 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/dax.c

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

2016-09-12 Thread Christoph Hellwig
On Mon, Sep 12, 2016 at 06:05:07PM +1000, Nicholas Piggin wrote: > It's not fundamentally broken, it just doesn't fit well existing > filesystems. Or the existing file system architecture for that matter. Which makes it a fundamentally broken model. > Dave's post of requirements is also wrong.

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

2016-09-25 Thread Christoph Hellwig
On Fri, Sep 23, 2016 at 03:02:37PM -0600, Ross Zwisler wrote: > I can just add a hack to hop over the writeback in generic_file_read_iter(), > but I hesitate to do this because it seems like the correct thing to do is to > separate the ext4 DAX & DIO paths, which I think you are already doing.

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

2016-09-25 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"? It introduces single whitespace indentation in a source base that is all about tabs and uses whitespaces very sparingly (some people use it to

Re: [PATCH 1/6] dax: Do not warn about BH_New buffers

2016-09-30 Thread Christoph Hellwig
_New buffers. > > Signed-off-by: Jan Kara <j...@suse.cz> Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 05/12] dax: make 'wait_table' global variable static

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 08/12] dax: remove dax_pmd_fault()

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 09/12] dax: correct dax iomap code namespace

2016-09-30 Thread Christoph Hellwig
om> I don't really care either way, but this is trivial enought to not introduce a bug, so: Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 04/12] ext2: remove support for DAX PMD faults

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 06/12] dax: consistent variable naming for DAX entries

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 03/12] dax: remove buffer_size_valid()

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 3/6] ext4: Remove clearing of BH_New bit for zeroed blocks

2016-09-30 Thread Christoph Hellwig
..@suse.cz> Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 2/6] ext2: Return BH_New buffers for zeroed blocks

2016-09-30 Thread Christoph Hellwig
> > Signed-off-by: Jan Kara <j...@suse.cz> Looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 6/6] dax: Avoid page invalidation races and unnecessary radix tree traversals

2016-09-30 Thread Christoph Hellwig
re we can do it > only when really necessary and after blocks have been allocated so > nobody will be instantiating new hole pages anymore. > > Signed-off-by: Jan Kara <j...@suse.cz> This looks fine with the comment from Dave addressed:

Re: [PATCH 01/20] mm: Change type of vmf->virtual_address

2016-09-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support

2016-09-30 Thread Christoph Hellwig
> -/* > - * We use lowest available bit in exceptional entry for locking, other two > - * bits to determine entry type. In total 3 special bits. > - */ > -#define RADIX_DAX_SHIFT (RADIX_TREE_EXCEPTIONAL_SHIFT + 3) > -#define RADIX_DAX_PTE (1 << (RADIX_TREE_EXCEPTIONAL_SHIFT + 1)) > -#define

Re: [PATCH 0/6] dax: Page invalidation fixes

2016-09-30 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 06:43:29PM +0200, Jan Kara wrote: > Hello, > > these patches fix races when invalidating hole pages in DAX mappings. See > changelogs for details. The series is based on my patches to write-protect > DAX PTEs because we really need to closely track dirtiness (and

Re: [PATCH 02/20] mm: Join struct fault_env and vm_fault

2016-09-30 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 06:08:06PM +0200, Jan Kara wrote: > Currently we have two different structures for passing fault information > around - struct vm_fault and struct fault_env. DAX will need more > information in struct vm_fault to handle its faults so the content of > that structure would

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-30 Thread Christoph Hellwig
> +static pgoff_t dax_entry_start(pgoff_t index, void *entry) > +{ > + if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > + index &= (PMD_MASK >> PAGE_SHIFT); > + return index; > +} > + > static wait_queue_head_t *dax_entry_waitqueue(struct address_space *mapping, > -

Re: [PATCH 5/6] mm: Invalidate DAX radix tree entries only if appropriate

2016-09-30 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 06:43:34PM +0200, Jan Kara wrote: > Currently invalidate_inode_pages2_range() and invalidate_mapping_pages() > just delete all exceptional radix tree entries they find. For DAX this > is not desirable as we track cache dirtiness in these entries and when > they are evicted,

Re: [PATCH 0/20 v3] dax: Clear dirty bits after flushing caches

2016-09-30 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 06:08:04PM +0200, Jan Kara wrote: > Hello, > > this is a third revision of my patches to clear dirty bits from radix tree of > DAX inodes when caches for corresponding pfns have been flushed. This patch > set > is significantly larger than the previous version because I'm

Re: [PATCH v4 00/12] re-enable DAX PMD support

2016-09-30 Thread Christoph Hellwig
On Thu, Sep 29, 2016 at 04:49:18PM -0600, Ross Zwisler wrote: > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > locking. This series allows DAX PMDs to participate in the DAX radix tree > based locking scheme so that they can be re-enabled. This seems to pass

Re: [PATCH v5 11/17] dax: correct dax iomap code namespace

2016-10-09 Thread Christoph Hellwig
Can you send this one to Dave for 4.9? It would be silly to rename something one merge window after it's just been introduced. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

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 10/12] xfs: use iomap to implement DAX

2016-09-14 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 11:32:47AM -0600, Ross Zwisler wrote: > I think this should be xfs_setfilesize(ip, pos, ret)? 'count' and 'ret' are > the same in non-error cases, but in error cases where iomap_dax_rw() does some > work and then encounters an error, 'ret' could be smaller. In error cases

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: [PATCH 10/12] xfs: use iomap to implement DAX

2016-09-15 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 10:29:33PM -0700, Darrick J. Wong wrote: > I'm a little confused about xfs_file_iomap_begin() and IOMAP_WRITE -- > prior to this patchset, it was only called via page_mkwrite and what > used to be write_begin, and all it did was create a delalloc reservation > to back the

Re: [PATCH v2 2/3] mm, dax: add VM_DAX flag for DAX VMAs

2016-09-15 Thread Christoph Hellwig
On Wed, Sep 14, 2016 at 11:54:38PM -0700, Dan Williams wrote: > The DAX property, page cache bypass, of a VMA is only detectable via the > vma_is_dax() helper to check the S_DAX inode flag. However, this is > only available internal to the kernel and is a property that userspace > applications

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

2016-09-16 Thread Christoph Hellwig
completion to the caller. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c| 114 include/linux/dax.h | 4 ++ 2 files changed, 118 insertions(+) dif

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

2016-09-16 Thread Christoph Hellwig
This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/f

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

2016-09-16 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 <h...@lst.de> --- fs/xfs/xfs_iomap.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/

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

2016-09-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/ext2/Kconfig | 1 + fs/ext2/ext2.h | 1 + fs/ext2/file.c | 76 +++-- fs/ext2/

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

2016-09-16 Thread Christoph Hellwig
Another users of buffer_heads bytes the dust. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/xfs/xfs_file.c | 61 +++--- fs/xfs/xfs_iomap.c | 11 ++ 2 files

[PATCH 09/12] xfs: refactor xfs_setfilesize

2016-09-16 Thread Christoph Hellwig
Rename the current function to __xfs_setfilesize and add a non-static wrapper that also takes care of creating the transaction. This new helper will be used by the new iomap-based DAX path. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_aops.

[PATCH 07/12] xfs: fix locking for DAX writes

2016-09-16 Thread Christoph Hellwig
transparently enable on applications without any knowledge of it we can't simply drop the requirement. Even worse this only happens for aligned writes and thus doesn't show up for many typical use cases. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/xfs/xfs_file.c | 20 +---

[PATCH 11/12] ext2: stop passing buffer_head to ext2_get_blocks

2016-09-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/ext2/inode.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index d5c7d09..2a

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

2016-09-16 Thread Christoph Hellwig
This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/f

  1   2   3   4   >