aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust2018-03-05 12:03:00 -0500
committerTrond Myklebust2018-09-30 15:35:17 -0400
commit8d8928d87960d71f898767185b8c0e4ce3de3cbe (patch)
tree4d512261635e3b1560160af32cf30e04fdc0f643 /include
parent80f42368868e082c5c1dcca6ada94f6b8eab4991 (diff)
NFSv3: Improve NFSv3 performance when server returns no post-op attributes
When the server fails to return post-op attributes, the client's attempt to place read data directly in the page cache fails, and so we have to do an extra copy in order to realign the data with page borders. This patch attempts to detect servers that don't return post-op attributes on read (e.g. for pNFS) and adjusts the placement calculation accordingly. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs_sb.h3
-rw-r--r--include/linux/nfs_xdr.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index bf39d9c92201..0fc0b9135d46 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -228,6 +228,9 @@ struct nfs_server {
unsigned short mountd_port;
unsigned short mountd_protocol;
struct rpc_wait_queue uoc_rpcwaitq;
+
+ /* XDR related information */
+ unsigned int read_hdrsize;
};
/* Server capabilities */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index bd1c889a9ed9..7f5535e5e852 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -608,6 +608,7 @@ struct nfs_pgio_args {
__u32 count;
unsigned int pgbase;
struct page ** pages;
+ unsigned int replen; /* used by read */
const u32 * bitmask; /* used by write */
enum nfs3_stable_how stable; /* used by write */
};
@@ -618,9 +619,9 @@ struct nfs_pgio_res {
__u32 count;
__u32 op_status;
int eof; /* used by read */
+ unsigned int replen; /* used by read */
struct nfs_writeverf * verf; /* used by write */
const struct nfs_server *server; /* used by write */
-
};
/*