Re: [RFC][PATCH 1/3] xip: no struct pages -- get_xip_mem

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

 




On Fri, 7 Mar 2008, Jared Hulbert wrote:
>
> [RFC][PATCH 1/3] xip: no struct pages -- get_xip_mem
> 
> Convert XIP to support non-struct page backed memory.
> The get_xip_page API is changed from a page based to an address/pfn based one.

Is there any way we could just re-use the same calling conventions as we 
already use for "vma->fault()"?

> +	int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **,
> +			unsigned long *);

This really looks very close to 

	int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);

and "struct vm_fault" returns either a kernel virtual address or a "struct 
page *" 

So would it be possible to just use the same calling convention, except 
passing a "struct address_space" instead of a "struct vm_area_struct"?

I realize that "struct vm_fault" doesn't have a pfn in it (if they don't 
do a "struct page", they are expected to fill in the PTE directly instead 
and return VM_FAULT_NOPAGE), but I wonder if it should.

The whole git_xip_page() issue really looks very similar to "fault in a 
page from an address space". It feels kind of wrong to have filesystems 
implement two functions for what seems to be the exact same issue.

			Linus
--
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