Thread (16 messages) 16 messages, 6 authors, 2010-08-03

Re: [PATCH V3 0/8] Cleancache: overview

From: Nitin Gupta <hidden>
Date: 2010-07-23 14:56:35
Also in: linux-btrfs, linux-fsdevel, linux-mm, lkml, ocfs2-devel

On 07/23/2010 01:46 PM, Minchan Kim wrote:
On Fri, Jul 23, 2010 at 4:36 PM, Nitin Gupta [off-list ref] wrote:
quoted
2. I think change in btrfs can be avoided by moving cleancache_get_page()
from do_mpage_reapage() to filemap_fault() and this should work for all
filesystems. See:

handle_pte_fault() -> do_(non)linear_fault() -> __do_fault()
                                               -> vma->vm_ops->fault()

which is defined as filemap_fault() for all filesystems. If some future
filesystem uses its own custom function (why?) then it will have to arrange for
call to cleancache_get_page(), if it wants this feature.

filemap fault works only in case of file-backed page which is mapped
but don't work not-mapped cache page.  So we could miss cache page by
read system call if we move it into filemap_fault.
Oh, yes. Then we need cleancache_get_page() call in do_generic_file_read() too.
So, if I am missing anything now, we should now be able to get rid of per-fs
changes.

Thanks,
Nitin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help