lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Feb 2021 11:24:18 +0800
From:   Ruan Shiyang <ruansy.fnst@...fujitsu.com>
To:     Christoph Hellwig <hch@....de>
CC:     <linux-kernel@...r.kernel.org>, <linux-xfs@...r.kernel.org>,
        <linux-nvdimm@...ts.01.org>, <linux-fsdevel@...r.kernel.org>,
        <darrick.wong@...cle.com>, <dan.j.williams@...el.com>,
        <willy@...radead.org>, <jack@...e.cz>, <viro@...iv.linux.org.uk>,
        <linux-btrfs@...r.kernel.org>, <ocfs2-devel@....oracle.com>,
        <david@...morbit.com>, <rgoldwyn@...e.de>,
        Goldwyn Rodrigues <rgoldwyn@...e.com>
Subject: Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function



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
>>>> 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 argument list can be modified to
>>>> accepts the iomap_ops pointer.  Then it looks like this:
>>>
>>> I'd say just add the iomap_ops pointer to
>>> generic_remap_file_range_prep and do away with the extra wrappers.  We
>>> only have three callers anyway.
>>
>> OK.
> 
> So looking at this again I think your proposal actaully is better,
> given that the iomap variant is still DAX specific.  Sorry for
> the noise.
> 
> Also I think dax_file_range_compare should use iomap_apply instead
> of open coding it.
> 

There are two files, which are not reflinked, need to be direct_access() 
here.  The iomap_apply() can handle one file each time.  So, it seems 
that iomap_apply() is not suitable for this case...


The pseudo code of this process is as follows:

   srclen = ops->begin(&srcmap)
   destlen = ops->begin(&destmap)

   direct_access(&srcmap, &saddr)
   direct_access(&destmap, &daddr)

   same = memcpy(saddr, daddr, min(srclen,destlen))

   ops->end(&destmap)
   ops->end(&srcmap)

I think a nested call like this is necessary.  That's why I use the open 
code way.


--
Thanks,
Ruan Shiyang.
> 


Powered by blists - more mailing lists