• Trond Myklebust's avatar
    [PATCH] Convert NFS client to use ->readpages() · b9a2dd76
    Trond Myklebust authored
      - Add the library function read_cache_pages(), which is used in a
        similar fashion to the single page 'read_cache_page()'. It hides
        the details of the LRU cache etc. from a filesystem that wants to
        to populate an address space with a list of pages.
    
      - Fix NFS so that readahead uses the ->readpages() interface. Means
        that we can immediately schedule an RPC call in order to complete
        the I/O, rather than relying on somebody later triggering it by
        calling lock_page() (and hence sync_page()). The sync_page()
        method is race-prone, since the waiting page may try to call it
        before we've finished initializing the 'struct nfs_page'.
    
      - Clear out nfs_sync_page(), the nfs_inode->read list, and
        friends. When the I/O completion gets scheduled in ->readpage(),
        ->readpages(), they have no reason to exist.
    b9a2dd76
readahead.c 13.1 KB