• Neil Brown's avatar
    [PATCH] kNFSd: Convert nfsd to use a list of pages instead of one big buffer · a0e7d495
    Neil Brown authored
    This means:
      1/ We don't need an order-4 allocation for each nfsd that starts
      2/ We don't need an order-4 allocation in skb_linearize when
         we receive a 32K write request
      3/ It will be easier to incorporate the zero-copy read changes
    
    The pages are handed around using an xdr_buf (instead of svc_buf)
    much like the NFS client so future crypto code can use the same
    data structure for both client and server.
    
    The code assumes that most requests and replies fit in a single page.
    The exceptions are assumed to have some largish 'data' bit, and the
    rest must fit in a single page.
    The 'data' bits are file data, readdir data, and symlinks.
    There must be only one 'data' bit per request.
    This is all fine for nfs/nlm.
    
    This isn't complete:
      1/ NFSv4 hasn't been converted yet (it won't compile)
      2/ NFSv3 allows symlinks upto 4096, but the code will only support
         upto about 3800 at the moment
      3/ readdir responses are limited to about 3800.
    
    but I thought that patch was big enough, and the rest can come
    later.
    
    
    This patch introduces vfs_readv and vfs_writev as parallels to
    vfs_read and vfs_write.  This means there is a fair bit of
    duplication in read_write.c that should probably be tidied up...
    a0e7d495
nfssvc.c 8.13 KB