Re: [PATCH 1/2] mm,fs,dax: Change ->pmd_fault to ->huge_fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 26-01-16 23:08:27, Matthew Wilcox wrote:
> From: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
> 
> In preparation for adding the ability to handle PUD pages, convert
> ->pmd_fault to ->huge_fault.  huge_fault() takes a vm_fault structure
> instead of separate (address, pmd, flags) parameters.  The vm_fault
> structure is extended to include a union of the different page table
> pointers that may be needed, and three flag bits are reserved to indicate
> which type of pointer is in the union.
> 
> The DAX fault handlers are unified into one entry point, meaning that
> the filesystems can be largely unconcerned with what size of fault they
> are handling.  ext4 needs to know in order to reserve enough blocks in
> the journal, but ext2 and xfs are oblivious.
> 
> The existing dax_fault and dax_mkwrite had no callers, so rename the
> __dax_fault and __dax_mkwrite to lose the initial underscores.
> 
> Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>

Thanks for these simplifications. I like them! Just one nit below:

> diff --git a/mm/memory.c b/mm/memory.c
> index a2eaeef..03d49eb 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3274,10 +3274,16 @@ out:
>  static int create_huge_pmd(struct mm_struct *mm, struct vm_area_struct *vma,
>  			unsigned long address, pmd_t *pmd, unsigned int flags)
>  {
> +	struct vm_fault vmf = {
> +		.virtual_address = (void __user *)address,
> +		.flags = flags | FAULT_FLAG_SIZE_PMD,
> +		.pmd = pmd,
> +	};
> +

I think we should fill in also the vmf.gfp_mask and vmf.pgoff fields. I
know they are not currently used but it would be a nasty surprise if
someone tried to use them in the future...

Otherwise feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux