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

2021-04-07 Thread ruansy.f...@fujitsu.com
.j.willi...@intel.com; j...@suse.cz; > v...@zeniv.linux.org.uk; linux-btrfs@vger.kernel.org; da...@fromorbit.com; > h...@lst.de; rgold...@suse.de; Ritesh Harjani > Subject: Re: [PATCH 1/3] fsdax: Factor helpers to simplify dax fault code > > On Wed, Apr 07, 2021 at 02:32:05PM +0800,

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

2021-04-07 Thread Matthew Wilcox
On Wed, Apr 07, 2021 at 02:32:05PM +0800, Shiyang Ruan wrote: > +static int dax_fault_cow_page(struct vm_fault *vmf, struct iomap *iomap, > + loff_t pos, vm_fault_t *ret) > +{ > + int error = 0; > + unsigned long vaddr = vmf->address; > + sector_t sector = dax_iomap_sector(i

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

2021-04-07 Thread riteshh
On 21/04/07 02:32PM, Shiyang Ruan wrote: > The dax page fault code is too long and a bit difficult to read. And it > is hard to understand when we trying to add new features. Some of the > PTE/PMD codes have similar logic. So, factor them as helper functions to > simplify the code. > > Signed-off-b

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

2021-04-06 Thread Shiyang Ruan
The dax page fault code is too long and a bit difficult to read. And it is hard to understand when we trying to add new features. Some of the PTE/PMD codes have similar logic. So, factor them as helper functions to simplify the code. Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Rev