RE: [PATCH v3 0/3] fsdax: Factor helper functions to simplify the code

2021-05-14 Thread ruansy.f...@fujitsu.com
current dax code. > > > > This is separated from the previous patchset called "V3 fsdax,xfs: Add > > reflink support for fsdax", and the previous comments are here[1]. > > > > [1]: > > https://patchwork.kernel.org/project/linux-nvdimm/patch/20210319015

RE: [PATCH v5 5/7] fsdax: Dedup file range to use a compare function

2021-05-14 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Subject: Re: [PATCH v5 5/7] fsdax: Dedup file range to use a compare function > > On Tue, May 11, 2021 at 11:09:31AM +0800, Shiyang Ruan wrote: > > With dax we cannot deal with readpage() etc. So, we create a dax > > comparison funciton

RE: [PATCH v5 1/7] fsdax: Introduce dax_iomap_cow_copy()

2021-05-13 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Subject: Re: [PATCH v5 1/7] fsdax: Introduce dax_iomap_cow_copy() > > On Tue, May 11, 2021 at 11:09:27AM +0800, Shiyang Ruan wrote: > > In the case where the iomap is a write operation and iomap is not > > equal to srcmap after iomap_begin,

RE: [PATCH v5 3/7] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-05-13 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Mika Penttilä > Subject: Re: [PATCH v5 3/7] fsdax: Add dax_iomap_cow_copy() for > dax_iomap_zero > > Hi, > > On 11.5.2021 6.09, Shiyang Ruan wrote: > > Punch hole on a reflinked file needs dax_copy_edge() too. Otherwise, > > data in not aligned area will be

RE: [PATCH v5 3/7] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-05-11 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Subject: Re: [PATCH v5 3/7] fsdax: Add dax_iomap_cow_copy() for > dax_iomap_zero > > On Tue, May 11, 2021 at 11:09:29AM +0800, Shiyang Ruan wrote: > > Punch hole on a reflinked file needs dax_copy_edge() too. Otherwise, > > data in not

RE: [PATCH v5 7/7] fs/xfs: Add dax dedupe support

2021-05-11 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Subject: Re: [PATCH v5 7/7] fs/xfs: Add dax dedupe support > > On Tue, May 11, 2021 at 11:09:33AM +0800, Shiyang Ruan wrote: > > Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files > > who are going to be deduped. After

RE: [PATCH v5 0/7] fsdax,xfs: Add reflink support for fsdax

2021-05-10 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Sent: Tuesday, May 11, 2021 11:57 AM > Subject: Re: [PATCH v5 0/7] fsdax,xfs: Add reflink support for fsdax > > On Tue, May 11, 2021 at 11:09:26AM +0800, Shiyang Ruan wrote: > > This patchset is attempt to add CoW support for fsdax, and take

RE: [PATCH v3 0/3] fsdax: Factor helper functions to simplify the code

2021-05-07 Thread ruansy.f...@fujitsu.com
> reflink support for fsdax", and the previous comments are here[1]. > > [1]: > https://patchwork.kernel.org/project/linux-nvdimm/patch/20210319015237.99 > 3880-3-ruansy.f...@fujitsu.com/ > > Changes from V2: > - fix the type of 'major' in patch 2 > - Rebased o

RE: [PATCH v3 1/3] fsdax: Factor helpers to simplify dax fault code

2021-04-26 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Ira Weiny > Sent: Tuesday, April 27, 2021 7:38 AM > Subject: Re: [PATCH v3 1/3] fsdax: Factor helpers to simplify dax fault code > > On Thu, Apr 22, 2021 at 09:44:59PM +0800, Shiyang Ruan wrote: > > The dax page fault code is too long and a bit difficult to

RE: [PATCH v4 1/7] fsdax: Introduce dax_iomap_cow_copy()

2021-04-08 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Sent: Friday, April 9, 2021 5:53 AM > Subject: Re: [PATCH v4 1/7] fsdax: Introduce dax_iomap_cow_copy() > > On Thu, Apr 08, 2021 at 08:04:26PM +0800, Shiyang Ruan wrote: > > In the case where the iomap is a write operation and iomap is not

RE: [PATCH v2 2/3] fsdax: Factor helper: dax_fault_actor()

2021-04-08 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Darrick J. Wong > Sent: Friday, April 9, 2021 5:11 AM > Subject: Re: [PATCH v2 2/3] fsdax: Factor helper: dax_fault_actor() > > On Wed, Apr 07, 2021 at 09:38:22PM +0800, Shiyang Ruan wrote: > > The core logic in the two dax page fault functions is similar.

RE: [PATCH v4 7/7] fs/xfs: Add dedupe support for fsdax

2021-04-08 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Su Yue > Subject: Re: [PATCH v4 7/7] fs/xfs: Add dedupe support for fsdax > > > On Thu 08 Apr 2021 at 20:04, Shiyang Ruan wrote: > > > Add xfs_break_two_dax_layouts() to break layout for tow dax files. > > Then call compare range function only when

RE: [PATCH v3 08/10] fsdax: Dedup file range to use a compare function

2021-04-07 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Ritesh Harjani > Subject: Re: [PATCH v3 08/10] fsdax: Dedup file range to use a compare > function > > On 21/03/19 09:52AM, Shiyang Ruan wrote: > > With dax we cannot deal with readpage() etc. So, we create a dax > > comparison funciton which is similar

RE: [PATCH 1/3] fsdax: Factor helpers to simplify dax fault code

2021-04-07 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Matthew Wilcox > Sent: Wednesday, April 7, 2021 7:14 PM > To: Ruan, Shiyang/阮 世阳 > Cc: linux-ker...@vger.kernel.org; linux-...@vger.kernel.org; > linux-nvdimm@lists.01.org; linux-fsde...@vger.kernel.org; > darrick.w...@oracle.com; dan.j.willi...@intel.com;

RE: [PATCH v3 00/10] fsdax,xfs: Add reflink support for fsdax

2021-04-02 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Christoph Hellwig > Sent: Friday, April 2, 2021 3:50 PM > Subject: Re: [PATCH v3 00/10] fsdax,xfs: Add reflink support for fsdax > > Shiyang, Dan: > > given that the whole reflink+dax thing is going to take a while and thus not > going > to happen for

RE: [PATCH v3 05/10] fsdax: Replace mmap entry in case of CoW

2021-04-01 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Ritesh Harjani > Sent: Thursday, April 1, 2021 2:40 PM > Subject: Re: [PATCH v3 05/10] fsdax: Replace mmap entry in case of CoW > > On 21/03/19 09:52AM, Shiyang Ruan wrote: > > We replace the existing entry to the newly allocated one in case of CoW. > >

RE: [PATCH v3 06/10] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-04-01 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Ritesh Harjani > Sent: Thursday, April 1, 2021 2:45 PM > Subject: Re: [PATCH v3 06/10] fsdax: Add dax_iomap_cow_copy() for > dax_iomap_zero > > On 21/03/19 09:52AM, Shiyang Ruan wrote: > > Punch hole on a reflinked file needs dax_copy_edge() too.

RE: [PATCH v3 02/10] fsdax: Factor helper: dax_fault_actor()

2021-03-30 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Ritesh Harjani > Sent: Tuesday, March 23, 2021 11:48 PM > Subject: Re: [PATCH v3 02/10] fsdax: Factor helper: dax_fault_actor() > > > > On 3/19/21 7:22 AM, Shiyang Ruan wrote: > > The core logic in the two dax page fault functions is similar. So, > >

RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-18 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: ruansy.f...@fujitsu.com > Subject: RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > > > > > > > > > > > After the conversation with Dave I don't see the point of this. > > > > >

RE: [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for dax mapping

2021-03-16 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: zhong jiang > Subject: Re: [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for > dax mapping > > > +int mf_dax_mapping_kill_procs(struct address_space *mapping, pgoff_t > > +index, int flags) { > > + const bool unmap_success = true; > > +

RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-12 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Dan Williams > Subject: Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > On Mon, Mar 8, 2021 at 3:34 AM ruansy.f...@fujitsu.com > wrote: > > > > > > 1 file changed, 8 insertions(+) > > &

RE: [PATCH v2 02/10] fsdax: Factor helper: dax_fault_actor()

2021-03-12 Thread ruansy.f...@fujitsu.com
> > + /* if we are reading UNWRITTEN and HOLE, return a hole. */ > > + if (!write && > > + (iomap->type == IOMAP_UNWRITTEN || iomap->type == > IOMAP_HOLE)) { > > + if (!pmd) > > + return dax_load_hole(xas, mapping, , vmf); > > + else > > +

Re: [PATCH v2 00/10] fsdax,xfs: Add reflink support for fsdax

2021-03-09 Thread ruansy.f...@fujitsu.com
> > Hi Shiang, > > Thanks for picking up this work. > > On 8:20 26/02, Shiyang Ruan wrote: > > This patchset is attempt to add CoW support for fsdax, and take XFS, > > which has both reflink and fsdax feature, as an example. > > How does this work for read sequence for two different files >

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-08 Thread ruansy.f...@fujitsu.com
> > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/include/linux/memremap.h b/include/linux/memremap.h > > > > index 79c49e7f5c30..0bcf2b1e20bd 100644 > > > > --- a/include/linux/memremap.h > > > > +++ b/include/linux/memremap.h > > > > @@ -87,6 +87,14 @@ struct dev_pagemap_ops

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-07 Thread ruansy.f...@fujitsu.com
> On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan > wrote: > > > > When memory-failure occurs, we call this function which is implemented > > by each kind of devices. For the fsdax case, pmem device driver > > implements it. Pmem device driver will find out the block device where > > the error

Re: [PATCH v2 09/10] fs/xfs: Handle CoW for fsdax write() path

2021-03-03 Thread ruansy.f...@fujitsu.com
> On Wed, Mar 03, 2021 at 09:57:48AM +0000, ruansy.f...@fujitsu.com wrote: > > > What is the advantage of the ioemap_end handler here? It adds another > > > indirect funtion call to the fast path, so if we can avoid it, I'd > > > rather do that. > > > > T

Re: [PATCH v2 09/10] fs/xfs: Handle CoW for fsdax write() path

2021-03-03 Thread ruansy.f...@fujitsu.com
> > On Fri, Feb 26, 2021 at 08:20:29AM +0800, Shiyang Ruan wrote: > > error = iomap_zero_range(VFS_I(ip), offset, len, NULL, > > - _buffered_write_iomap_ops); > > + IS_DAX(VFS_I(ip)) ? > > + _dax_write_iomap_ops : _buffered_write_iomap_ops); >

Re: [PATCH v2 05/10] fsdax: Replace mmap entry in case of CoW

2021-03-03 Thread ruansy.f...@fujitsu.com
> > > > if (dirty) > > __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); > > I still think the __mark_inode_dirty should just be moved into the one > caller that needs it. I found that the dirty flag will be used in the next few lines, so I keep this function inside. If I

Question about the "EXPERIMENTAL" tag for dax in XFS

2021-02-26 Thread ruansy.f...@fujitsu.com
Hi, guys Beside this patchset, I'd like to confirm something about the "EXPERIMENTAL" tag for dax in XFS. In XFS, the "EXPERIMENTAL" tag, which is reported in waring message when we mount a pmem device with dax option, has been existed for a while. It's a bit annoying when using fsdax

Re: [PATCH v2 07/10] iomap: Introduce iomap_apply2() for operations on two files

2021-02-26 Thread ruansy.f...@fujitsu.com
> On Fri, Feb 26, 2021 at 08:20:27AM +0800, Shiyang Ruan wrote: > > Some operations, such as comparing a range of data in two files under > > fsdax mode, requires nested iomap_open()/iomap_end() on two file. Thus, > > we introduce iomap_apply2() to accept arguments from two files and > >

回复: [PATCH 1/7] fsdax: Output address in dax_iomap_pfn() and rename it

2021-02-22 Thread ruansy.f...@fujitsu.com
> hi, > > > Add address output in dax_iomap_pfn() in order to perform a memcpy() in > > CoW case. Since this function both output address and pfn, rename it to > > dax_iomap_direct_access(). > > > > Signed-off-by: Shiyang Ruan > > --- > > fs/dax.c | 20 +++- > > 1 file