Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-21 Thread Christoph Hellwig
On Fri, Sep 17, 2021 at 08:33:04AM -0700, Darrick J. Wong wrote: > > More importantly before we can merge this series we also need the VM > > level support for reflink-aware reverse mapping. So while this series > > here is no in a good enough shape I don't see how we could merge it > > without

Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-17 Thread Darrick J. Wong
On Thu, Sep 16, 2021 at 08:32:51AM +0200, Christoph Hellwig wrote: > On Wed, Sep 15, 2021 at 05:22:27PM -0700, Darrick J. Wong wrote: > > > xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED); > > > ret = dax_iomap_fault(vmf, pe_size, , NULL, > > >

Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-16 Thread Shiyang Ruan
On 2021/9/16 14:23, Christoph Hellwig wrote: On Wed, Sep 15, 2021 at 06:45:00PM +0800, Shiyang Ruan wrote: +static int +xfs_dax_write_iomap_end( + struct inode*inode, + loff_t pos, + loff_t length, + ssize_t

Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-16 Thread Christoph Hellwig
On Wed, Sep 15, 2021 at 05:22:27PM -0700, Darrick J. Wong wrote: > > xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED); > > ret = dax_iomap_fault(vmf, pe_size, , NULL, > > (write_fault && !vmf->cow_page) ? > > -

Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-16 Thread Christoph Hellwig
On Wed, Sep 15, 2021 at 06:45:00PM +0800, Shiyang Ruan wrote: > +static int > +xfs_dax_write_iomap_end( > + struct inode*inode, > + loff_t pos, > + loff_t length, > + ssize_t written, > + unsigned

Re: [PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-15 Thread Darrick J. Wong
On Wed, Sep 15, 2021 at 06:45:00PM +0800, Shiyang Ruan wrote: > In fsdax mode, WRITE and ZERO on a shared extent need CoW performed. > After that, new allocated extents needs to be remapped to the file. > So, add a CoW identification in ->iomap_begin(), and implement > ->iomap_end() to do the

[PATCH v9 7/8] xfs: support CoW in fsdax mode

2021-09-15 Thread Shiyang Ruan
In fsdax mode, WRITE and ZERO on a shared extent need CoW performed. After that, new allocated extents needs to be remapped to the file. So, add a CoW identification in ->iomap_begin(), and implement ->iomap_end() to do the remapping work. Signed-off-by: Shiyang Ruan --- fs/xfs/xfs_bmap_util.c