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

2021-02-24 Thread Christoph Hellwig
On Thu, Feb 18, 2021 at 08:20:18AM -0800, Darrick J. Wong wrote: > > I think a nested call like this is necessary. That's why I use the open > > code way. > > This might be a good place to implement an iomap_apply2() loop that > actually /does/ walk all the extents of file1 and file2. There's no

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

2021-02-18 Thread Darrick J. Wong
On Wed, Feb 17, 2021 at 11:24:18AM +0800, Ruan Shiyang wrote: > > > On 2021/2/10 下午9:19, Christoph Hellwig wrote: > > On Tue, Feb 09, 2021 at 05:46:13PM +0800, Ruan Shiyang wrote: > > > > > > > > > On 2021/2/9 下午5:34, Christoph Hellwig wrote: > > > > On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ru

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

2021-02-16 Thread Ruan Shiyang
On 2021/2/10 下午9:19, Christoph Hellwig wrote: On Tue, Feb 09, 2021 at 05:46:13PM +0800, Ruan Shiyang wrote: On 2021/2/9 下午5:34, Christoph Hellwig wrote: On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: The dax dedupe comparison need the iomap_ops pointer as argument, so my un

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

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:46:13PM +0800, Ruan Shiyang wrote: > > > On 2021/2/9 下午5:34, Christoph Hellwig wrote: >> On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: >>> The dax dedupe comparison need the iomap_ops pointer as argument, so my >>> understanding is that we don't modify the

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

2021-02-09 Thread Ruan Shiyang
On 2021/2/9 下午5:34, Christoph Hellwig wrote: On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: The dax dedupe comparison need the iomap_ops pointer as argument, so my understanding is that we don't modify the argument list of generic_remap_file_range_prep(), but move its code into

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

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: > The dax dedupe comparison need the iomap_ops pointer as argument, so my > understanding is that we don't modify the argument list of > generic_remap_file_range_prep(), but move its code into > __generic_remap_file_range_prep() whose

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

2021-02-09 Thread Ruan Shiyang
On 2021/2/8 下午11:19, Christoph Hellwig wrote: On Mon, Feb 08, 2021 at 01:09:22AM +0800, Shiyang Ruan wrote: With dax we cannot deal with readpage() etc. So, we create a funciton callback to perform the file data comparison and pass s/funciton/function/g +#define MIN(a, b) (((a) < (b)) ? (

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

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 01:09:22AM +0800, Shiyang Ruan wrote: > With dax we cannot deal with readpage() etc. So, we create a > funciton callback to perform the file data comparison and pass s/funciton/function/g > +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) This should use the existing min or m

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

2021-02-07 Thread Shiyang Ruan
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. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Shiyang Ruan --- fs/btrfs/reflink.c | 3 +- f