[ndctl PATCH 2/3] test, device-dax: fix 'skip' reporting when test device not found

2016-09-09 Thread Dan Williams
If we are unable to find a test device, then the test should report skipped. However if any ndctl_test_attempt() succeeds prior to this discovery ndctl_test_result() will return success (0) instead of skip (77). Re-arrange the 4.7 kernel version check to be after the device availability check.

[ndctl PATCH 0/3] device-dax test for recent kernel bugs

2016-09-09 Thread Dan Williams
These tests trigger the kernel bugs fixed by the following commits: d0e5845561c2 dax: fix device-dax region base 9049771f7d54 mm: fix cache mode of dax pmd mappings ca120cf68887 mm: fix show_smap() for zone_device-pmd ranges --- Dan Williams (3): test, device-dax: /proc/self/smaps

Re: [PATCH 2/5] dax: fix offset to physical address translation

2016-09-09 Thread Dan Williams
On Tue, Sep 6, 2016 at 9:49 AM, Dan Williams wrote: > In pgoff_to_phys() 'pgoff' is already relative to base of the dax > device, so we only need to compare if the current offset is within the > current resource extent. Otherwise, we are double accounting the > resource

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

2016-09-09 Thread Dan Williams
/me grumbles about top-posting... On Fri, Sep 9, 2016 at 1:35 PM, Matthew Wilcox wrote: > I feel like we're not only building on shifting sands, but we haven't decided > whether we're building a Pyramid or a Sphinx. > > I thought after Storage Summit, we had broad

[PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly

2016-09-09 Thread Toshi Kani
shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, which leads to a reversed effect of "huge=" mount option. Fix the check in shmem_get_unmapped_area(). Note, the default value of SHMEM_SB(sb)->huge remains as SHMEM_HUGE_NEVER. User will need to specify "huge=" option to enable

[PATCH 0/2] refactor shmem_get_unmapped_area()

2016-09-09 Thread Toshi Kani
shmem_get_unmapped_area() provides a functionality similar to __thp_get_unmapped_area() as both allocate a pmd-aligned address. This patchset changes shmem_get_unmapped_area() to call __thp_get_unmapped_area() to share the code. Patch 1 fixes a bug in shmem_get_unmapped_area() first. Patch 2

Re: [PATCH v4 RESEND 0/2] Align mmap address for DAX pmd mappings

2016-09-09 Thread Kirill A. Shutemov
On Fri, Sep 09, 2016 at 05:21:40PM +, Kani, Toshimitsu wrote: > On Fri, 2016-09-09 at 15:36 +0300, Kirill A. Shutemov wrote: > > On Thu, Sep 08, 2016 at 11:21:46PM +, Kani, Toshimitsu wrote: > > > > > > On Thu, 2016-09-08 at 07:48 -0600, Kani, Toshimitsu wrote: > > > > > > > > On Thu,

Re: [PATCH] /dev/dax: fix Kconfig dependency build breakage

2016-09-09 Thread Dan Williams
On Fri, Sep 9, 2016 at 10:56 AM, Ross Zwisler wrote: > The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the > CONFIG_DEV_DAX_PMEM tri-state config option. This config option currently > only depends on CONFIG_NVDIMM_DAX, which means that the

[PATCH] /dev/dax: fix Kconfig dependency build breakage

2016-09-09 Thread Ross Zwisler
The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the CONFIG_DEV_DAX_PMEM tri-state config option. This config option currently only depends on CONFIG_NVDIMM_DAX, which means that the following configuration is possible: CONFIG_LIBNVDIMM=m ... CONFIG_NVDIMM_DAX=y

Re: [PATCH] libnvdimm: allow legacy (e820) pmem region to clear bad blocks

2016-09-09 Thread Verma, Vishal L
On Thu, 2016-09-08 at 20:57 -0700, Dan Williams wrote: > On Thu, Sep 8, 2016 at 5:28 PM, Verma, Vishal L > wrote: > > > > On Thu, 2016-09-08 at 16:33 -0700, Dave Jiang wrote: > > > > > > Bad blocks can be injected via /sys/block/pmemN/badblocks. In a > > > situation >

Re: [PATCH v4 RESEND 0/2] Align mmap address for DAX pmd mappings

2016-09-09 Thread Kani, Toshimitsu
On Fri, 2016-09-09 at 15:36 +0300, Kirill A. Shutemov wrote: > On Thu, Sep 08, 2016 at 11:21:46PM +, Kani, Toshimitsu wrote: > > > > On Thu, 2016-09-08 at 07:48 -0600, Kani, Toshimitsu wrote: > > > > > > On Thu, 2016-09-08 at 13:57 +0300, Kirill A. Shutemov wrote: > > > > > > > > On Mon,

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

2016-09-09 Thread Christoph Hellwig
So far DAX writes inherited the locking from direct I/O writes, but the direct I/O model of using shared locks for writes is actually wrong for DAX. For direct I/O we're out of any standards and don't have to provide the Posix required exclusion between writers, but for DAX which gets

[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 --- fs/xfs/xfs_aops.c | 33

[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 --- 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

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

2016-09-09 Thread Christoph Hellwig
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 end_io handler, but instead leaves locking and filesystem-specific I/O

[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 --- 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 +++

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

2016-09-09 Thread Dan Williams
On Fri, Sep 9, 2016 at 1:55 AM, Xiao Guangrong wrote: [..] >> >> Whether a persistent memory mapping requires an msync/fsync is a >> filesystem specific question. This mincore proposal is separate from >> that. Consider device-DAX for volatile memory or mincore()

Re: DAX can not work on virtual nvdimm device

2016-09-09 Thread Theodore Ts'o
On Fri, Sep 09, 2016 at 11:19:25AM +0200, Jan Kara wrote: > > > > > 1. make the guest kernel based on your tree, the top commit is > > > > >10d7902fa0e82b (dax: unmap/truncate on device shutdown) and > > > > >the config file can be found in this thread. What git tree is 10d7902fa0e82b

Re: DAX can not work on virtual nvdimm device

2016-09-09 Thread Jan Kara
On Thu 08-09-16 14:47:08, Ross Zwisler wrote: > On Tue, Sep 06, 2016 at 05:06:20PM +0200, Jan Kara wrote: > > On Thu 01-09-16 20:57:38, Ross Zwisler wrote: > > > On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote: > > > > On 08/31/2016 01:09 AM, Dan Williams wrote: > > > > > > > > > >