aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-24 13:15:37 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 15:35:17 -0400
commit28d52235ee25ba7d843242b4cb3c3f27a8828b5a (patch)
treed7943419c107060c860c15dce0239f10d29a0724 /include/linux/nfs_xdr.h
parentNFSv3: Improve NFSv3 performance when server returns no post-op attributes (diff)
downloadlinux-dev-28d52235ee25ba7d843242b4cb3c3f27a8828b5a.tar.xz
linux-dev-28d52235ee25ba7d843242b4cb3c3f27a8828b5a.zip
NFSv4: Save a few bytes in the nfs_pgio_args/res
Save a few bytes by allowing the read/write specific fields of the structures to share storage. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 7f5535e5e852..343e44166346 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -608,9 +608,13 @@ 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 */
+ union {
+ unsigned int replen; /* used by read */
+ struct {
+ const u32 * bitmask; /* used by write */
+ enum nfs3_stable_how stable; /* used by write */
+ };
+ };
};
struct nfs_pgio_res {
@@ -618,10 +622,16 @@ struct nfs_pgio_res {
struct nfs_fattr * fattr;
__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 */
+ union {
+ struct {
+ unsigned int replen; /* used by read */
+ int eof; /* used by read */
+ };
+ struct {
+ struct nfs_writeverf * verf; /* used by write */
+ const struct nfs_server *server; /* used by write */
+ };
+ };
};
/*