Returned mail: see transcript for details

2019-04-16 Thread Automatic Email Delivery Software
This Message was undeliverable due to the following reason: Your message was not delivered because the destination computer was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely ther

Re: [RFC PATCH 0/4] xfs: add handle for reflink in dax

2019-04-16 Thread Shiyang Ruan
On 4/17/19 9:34 AM, Darrick J. Wong wrote: On Wed, Apr 18, 2019 at 09:27:11AM +0800, Shiyang Ruan wrote: In XFS (under fsdax mode), reflink did not work correctly because xfs iomap operators did not handle the inode with both reflink and dax flag. This patchset aims to take care of this issu

Re: [RFC PATCH 0/4] xfs: add handle for reflink in dax

2019-04-16 Thread Darrick J. Wong
On Wed, Apr 18, 2019 at 09:27:11AM +0800, Shiyang Ruan wrote: > In XFS (under fsdax mode), reflink did not work correctly because xfs > iomap operators did not handle the inode with both reflink and dax flag. > > This patchset aims to take care of this issue to make COW operation work > correctly

[RFC PATCH 1/4] fs/iomap: Introduce src_addr for COW in fsdax mode.

2019-04-16 Thread Shiyang Ruan
When using reflink, coping the source blocks before writing data into new allocated blocks is required. In fsdax mode, we need a source blocks' start address to handle the COW operation. Signed-off-by: Shiyang Ruan --- include/linux/iomap.h | 4 1 file changed, 4 insertions(+) diff --git

[RFC PATCH 2/4] fs/xfs: iomap: add handle for reflink in fsdax mode

2019-04-16 Thread Shiyang Ruan
xfs_file_iomap_begin() is supposed to allocate new extents for reflinked inode and pass the source blocks' start address to the actor functions. Signed-off-by: Shiyang Ruan --- fs/xfs/xfs_iomap.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs

[RFC PATCH 4/4] fs/xfs: iomap: update the extent list after a COW

2019-04-16 Thread Shiyang Ruan
COW allocated new extents, which are new part of the inode, So we need to update the metadata. Signed-off-by: Shiyang Ruan --- fs/xfs/xfs_iomap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index a45b4e5a1d87..5c05c11e0cb2 100644 --- a/fs/xfs/x

[RFC PATCH 3/4] fs/dax: copy source blocks before writing when COW

2019-04-16 Thread Shiyang Ruan
The actor functions get the source blocks' start address from iomap->src_addr, and then copy these blocks to the new allocated blocks before writing the user data. Signed-off-by: Shiyang Ruan cc: linux-nvdimm@lists.01.org --- fs/dax.c | 70

[RFC PATCH 0/4] xfs: add handle for reflink in dax

2019-04-16 Thread Shiyang Ruan
In XFS (under fsdax mode), reflink did not work correctly because xfs iomap operators did not handle the inode with both reflink and dax flag. This patchset aims to take care of this issue to make COW operation work correctly in XFS. XFS uses iomap to do read/write/mmap operations: vfs interfac

RE: [PATCH 02/18] btrfs: Carve out btrfs_get_extent_map_write() out of btrfs_get_blocks_write()

2019-04-16 Thread Elliott, Robert (Servers)
> -Original Message- > From: Linux-nvdimm [mailto:linux-nvdimm-boun...@lists.01.org] On Behalf Of > Goldwyn Rodrigues > Sent: Tuesday, April 16, 2019 11:42 AM > Subject: [PATCH 02/18] btrfs: Carve out btrfs_get_extent_map_write() out of > btrfs_get_blocks_write() ... > +static int btrfs_g

[PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a

Re: [PATCH 01/18] btrfs: create a mount option for dax

2019-04-16 Thread Dan Williams
On Tue, Apr 16, 2019 at 9:42 AM Goldwyn Rodrigues wrote: > > From: Goldwyn Rodrigues > > This sets S_DAX in inode->i_flags, which can be used with > IS_DAX(). > > The dax option is restricted to non multi-device mounts. > dax interacts with the device directly instead of using bio, so > all bio-h

[PATCH 14/18] dax: memcpy before zeroing range

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues However, this needed more iomap fields, so it was easier to pass iomap and compute inside the function rather than passing a log of arguments. Note, there is subtle difference between iomap_sector and dax_iomap_sector(). Can we replace dax_iomap_sector with iomap_sector()

[PATCH 15/18] btrfs: handle dax page zeroing

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues btrfs_dax_zero_block() zeros part of the page, either from the front or the regular rest of the block. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 1 + fs/btrfs/dax.c | 27 ++- fs/btrfs/inode.c | 4 3 files changed, 31 insert

[PATCH 16/18] btrfs: Writeprotect mmap pages on snapshot

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Inorder to make sure mmap'd files don't change after snapshot, writeprotect the mmap pages on snapshot. This is done by performing a data writeback on the pages (which simply mark the pages are wrprotected). This way if the user process tries to access the memory we will g

[PATCH 17/18] btrfs: Disable dax-based defrag and send

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues This is temporary, and a TODO. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ioctl.c | 13 + fs/btrfs/send.c | 4 2 files changed, 17 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index cd590105bd78..8ac770fe00dc 100644 --- a/fs/btrf

[PATCH 18/18] btrfs: trace functions for btrfs_iomap_begin/end

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues This is for debug purposes only and can be skipped. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/dax.c | 3 +++ include/trace/events/btrfs.h | 56 2 files changed, 59 insertions(+) diff --git a/fs/btrfs/dax.c

[PATCH 08/18] dax: memcpy page in case of IOMAP_DAX_COW for mmap faults

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Change dax_iomap_pfn to return the address as well in order to use it for performing a memcpy in case the type is IOMAP_DAX_COW. Question: The sequence of bdev_dax_pgoff() and dax_direct_access() is used multiple times to calculate address and pfn's. Would it make sense t

[PATCH 09/18] btrfs: Add dax specific address_space_operations

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/inode.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7fc778eb6bd2..c2c0544009a7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs

[PATCH 10/18] dax: replace mmap entry in case of CoW

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues We replace the existing entry to the newly allocated one in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE so writeback marks this entry as writeprotected. This helps us snapshots so new write pagefaults after snapshots trigger a CoW. Signed-off-by: Goldwyn

[PATCH 13/18] fs: dedup file range to use a compare function

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues With dax we cannot deal with readpage() etc. So, we create a funciton callback to perform the file data comparison and pass it to generic_remap_file_range_prep() so it can use iomap-based functions. This may not be the best way to solve this. Suggestions welcome. Signed-

[PATCH 12/18] btrfs: allow MAP_SYNC mmap

2019-04-16 Thread Goldwyn Rodrigues
From: Adam Borowski Used by userspace to detect DAX. [rgold...@suse.com: Added CONFIG_FS_DAX around mmap_supported_flags] Signed-off-by: Adam Borowski Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/file.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c

[PATCH 06/18] btrfs: Rename __endio_write_update_ordered() to btrfs_update_ordered_extent()

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Since we will be using it in another part of the code, use a better name to declare it non-static Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 7 +-- fs/btrfs/inode.c | 14 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/f

[PATCH 05/18] btrfs: return whether extent is nocow or not

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues We require this to make sure we return type IOMAP_DAX_COW in iomap structure, in the later patches. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 9 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ctre

[PATCH 11/18] btrfs: add dax mmap support

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Add a new vm_operations struct btrfs_dax_vm_ops specifically for dax files. Since we will be removing(nulling) readpages/writepages for dax return ENOEXEC only for non-dax files. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 1 + fs/btrfs/dax.c | 13 ++

[PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues The IOMAP_DAX_COW is a iomap type which performs copy of edges of data while performing a write if start/end are not page aligned. The source address is expected in iomap->inline_data. dax_copy_edges() is a helper functions performs a copy from one part of the device to a

[PATCH 07/18] btrfs: add dax write support

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues IOMAP_DAX_COW allows to inform the dax code, to first perform a copy which are not page-aligned before performing the write. The responsibility of checking if data edges are page aligned is performed in ->iomap_begin() and the source address is stored in ->inline_data A n

[PATCH v3 00/18] btrfs dax support

2019-04-16 Thread Goldwyn Rodrigues
This patch set adds support for dax on the BTRFS filesystem. In order to support for CoW for btrfs, there were changes which had to be made to the dax handling. The important one is copying blocks into the same dax device before using them which is performed by iomap type IOMAP_DAX_COW. Snapshotti

[PATCH 02/18] btrfs: Carve out btrfs_get_extent_map_write() out of btrfs_get_blocks_write()

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues This makes btrfs_get_extent_map_write() independent of Direct I/O code. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 2 ++ fs/btrfs/inode.c | 40 +++- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/fs/btr

[PATCH 03/18] btrfs: basic dax read

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Perform a basic read using iomap support. The btrfs_iomap_begin() finds the extent at the position and fills the iomap data structure with the values. Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/Makefile | 1 + fs/btrfs/ctree.h | 5 + fs/btrfs/dax.c| 49 +++

[PATCH 01/18] btrfs: create a mount option for dax

2019-04-16 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues This sets S_DAX in inode->i_flags, which can be used with IS_DAX(). The dax option is restricted to non multi-device mounts. dax interacts with the device directly instead of using bio, so all bio-hooks which we use for multi-device cannot be performed here. While regular

linux-nvdimm:掌握TOYOTA TPS精益生产管理模式的精髓

2019-04-16 Thread 杜败
序 号:679469993 linux-nvdimm:亲 请 参考 附 件,两 天 为 您 解 决 一 切 问 题 ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: DAX numa_attribute vs SubNUMA clusters

2019-04-16 Thread Brice Goglin
Le 08/04/2019 à 21:55, Brice Goglin a écrit : > Le 08/04/2019 à 16:56, Dan Williams a écrit : >> Yes, I agree with all of the above, but I think we need a way to fix >> this independent of the HMAT data being present. The SLIT already >> tells the kernel enough to let tooling figure out equidistan

Re: [patch] libnvdimm/label: Check for a disabled nmem when deleting labels

2019-04-16 Thread Jeff Moyer
Dan Williams writes: > On Mon, Apr 15, 2019 at 1:32 PM Jeff Moyer wrote: >> >> Hi, >> >> We ran into a situation where one dimm's label area was corrupt (it had >> multiple entries for the same DPA), and so that nmem was disabled. The >> region as a whole was enabled, though. In this case, the