NFS: create common nfs_pgio_header for both read and write
In order to avoid duplicating all the data in nfs_read_data whenever we split it up into multiple RPC calls (either due to a short read result or due to rsize < PAGE_SIZE), we split out the bits that are the same per RPC call into a separate "header" structure. The goal this patch moves towards is to have a single header refcounted by several rpc_data structures. Thus, want to always refer from rpc_data to the header, and not the other way. This patch comes close to that ideal, but the directio code currently needs some special casing, isolated in the nfs_direct_[read_write]hdr_release() functions. This will be dealt with in a future patch. Signed-off-by:Fred Isaman <iisaman@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
Showing
- fs/nfs/blocklayout/blocklayout.c 43 additions, 36 deletionsfs/nfs/blocklayout/blocklayout.c
- fs/nfs/direct.c 50 additions, 23 deletionsfs/nfs/direct.c
- fs/nfs/internal.h 4 additions, 0 deletionsfs/nfs/internal.h
- fs/nfs/nfs3proc.c 9 additions, 5 deletionsfs/nfs/nfs3proc.c
- fs/nfs/nfs4filelayout.c 23 additions, 17 deletionsfs/nfs/nfs4filelayout.c
- fs/nfs/nfs4proc.c 25 additions, 19 deletionsfs/nfs/nfs4proc.c
- fs/nfs/objlayout/objio_osd.c 9 additions, 7 deletionsfs/nfs/objlayout/objio_osd.c
- fs/nfs/objlayout/objlayout.c 11 additions, 8 deletionsfs/nfs/objlayout/objlayout.c
- fs/nfs/pnfs.c 59 additions, 43 deletionsfs/nfs/pnfs.c
- fs/nfs/proc.c 7 additions, 3 deletionsfs/nfs/proc.c
- fs/nfs/read.c 51 additions, 38 deletionsfs/nfs/read.c
- fs/nfs/write.c 58 additions, 46 deletionsfs/nfs/write.c
- include/linux/nfs_fs.h 0 additions, 12 deletionsinclude/linux/nfs_fs.h
- include/linux/nfs_xdr.h 27 additions, 21 deletionsinclude/linux/nfs_xdr.h
Loading
Please register or sign in to comment