Re: [PATCH v9 5/8] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-09-16 Thread Darrick J. Wong
On Thu, Sep 16, 2021 at 04:49:19PM +0800, Shiyang Ruan wrote: > > > On 2021/9/16 14:16, Christoph Hellwig wrote: > > On Wed, Sep 15, 2021 at 06:44:58PM +0800, Shiyang Ruan wrote: > > > + rc = dax_direct_access(iomap->dax_dev, pgoff, 1, , NULL); > > > + if (rc < 0) > > > + goto out; > > >

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-16 Thread Dan Williams
On Thu, Sep 16, 2021 at 12:12 AM Christoph Hellwig wrote: > > On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote: > > > Yeah, Christoph suggested that we make the clearing operation explicit > > > in a related thread a few weeks ago: > > >

Re: [PATCH v9 3/8] fsdax: Replace mmap entry in case of CoW

2021-09-16 Thread kernel test robot
Hi Shiyang, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.15-rc1 next-20210916] [cannot apply to xfs-linux/for-next hch-configfs/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

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 5/8] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-09-16 Thread Shiyang Ruan
On 2021/9/16 14:16, Christoph Hellwig wrote: On Wed, Sep 15, 2021 at 06:44:58PM +0800, Shiyang Ruan wrote: + rc = dax_direct_access(iomap->dax_dev, pgoff, 1, , NULL); + if (rc < 0) + goto out; + memset(kaddr + offset, 0, size); + if (srcmap->addr !=

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-16 Thread Christoph Hellwig
On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote: > > Yeah, Christoph suggested that we make the clearing operation explicit > > in a related thread a few weeks ago: > > https://lore.kernel.org/linux-fsdevel/yrtnlperhfmz2...@infradead.org/ > > That seemed to be tied to a proposal to

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 4/8] fsdax: Convert dax_iomap_zero to iter model

2021-09-16 Thread Christoph Hellwig
> -s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap) > +s64 dax_iomap_zero(struct iomap_iter *iter, loff_t pos, u64 length) I think we can also mark the iter const. Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v9 6/8] fsdax: Dedup file range to use a compare function

2021-09-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v9 5/8] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-09-16 Thread Christoph Hellwig
On Wed, Sep 15, 2021 at 06:44:58PM +0800, Shiyang Ruan wrote: > + rc = dax_direct_access(iomap->dax_dev, pgoff, 1, , NULL); > + if (rc < 0) > + goto out; > + memset(kaddr + offset, 0, size); > + if (srcmap->addr != IOMAP_HOLE && srcmap->addr != iomap->addr) { Should we