• David Howells's avatar
    nfs: Implement cache I/O by accessing the cache directly · 16f2f4e6
    David Howells authored
    
    
    Move NFS to using fscache DIO API instead of the old upstream I/O API as
    that has been removed.  This is a stopgap solution as the intention is that
    at sometime in the future, the cache will move to using larger blocks and
    won't be able to store individual pages in order to deal with the potential
    for data corruption due to the backing filesystem being able insert/remove
    bridging blocks of zeros into its extent list[1].
    
    NFS then reads and writes cache pages synchronously and one page at a time.
    
    The preferred change would be to use the netfs lib, but the new I/O API can
    be used directly.  It's just that as the cache now needs to track data for
    itself, caching blocks may exceed page size...
    
    This code is somewhat borrowed from my "fallback I/O" patchset[2].
    
    Changes
    =======
    ver #3:
     - Restore lost =n fallback for nfs_fscache_release_page()[2].
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Tested-by: default avatarDave Wysochanski <dwysocha@redhat.com>
    Acked...
    16f2f4e6
fscache.c 10.4 KB