]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - include/linux/nfs_xdr.h
NFS: create common nfs_pgio_header for both read and write
authorFred Isaman <iisaman@netapp.com>
Fri, 20 Apr 2012 18:47:44 +0000 (14:47 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 27 Apr 2012 18:10:37 +0000 (14:10 -0400)
commitcd841605f7a721878d8a2d1362484723d8abf569
treeb5c37db575cd545a183577249909e042fe38d646
parentb5542849764aa56fd3f05c0041195b637b9d2ac2
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>
14 files changed:
fs/nfs/blocklayout/blocklayout.c
fs/nfs/direct.c
fs/nfs/internal.h
fs/nfs/nfs3proc.c
fs/nfs/nfs4filelayout.c
fs/nfs/nfs4proc.c
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objlayout.c
fs/nfs/pnfs.c
fs/nfs/proc.c
fs/nfs/read.c
fs/nfs/write.c
include/linux/nfs_fs.h
include/linux/nfs_xdr.h