Skip to content

Commit 28d5223

Browse files
author
Trond Myklebust
committed
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>
1 parent 8d8928d commit 28d5223

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

include/linux/nfs_xdr.h

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -608,20 +608,30 @@ struct nfs_pgio_args {
608608
__u32 count;
609609
unsigned int pgbase;
610610
struct page ** pages;
611-
unsigned int replen; /* used by read */
612-
const u32 * bitmask; /* used by write */
613-
enum nfs3_stable_how stable; /* used by write */
611+
union {
612+
unsigned int replen; /* used by read */
613+
struct {
614+
const u32 * bitmask; /* used by write */
615+
enum nfs3_stable_how stable; /* used by write */
616+
};
617+
};
614618
};
615619

616620
struct nfs_pgio_res {
617621
struct nfs4_sequence_res seq_res;
618622
struct nfs_fattr * fattr;
619623
__u32 count;
620624
__u32 op_status;
621-
int eof; /* used by read */
622-
unsigned int replen; /* used by read */
623-
struct nfs_writeverf * verf; /* used by write */
624-
const struct nfs_server *server; /* used by write */
625+
union {
626+
struct {
627+
unsigned int replen; /* used by read */
628+
int eof; /* used by read */
629+
};
630+
struct {
631+
struct nfs_writeverf * verf; /* used by write */
632+
const struct nfs_server *server; /* used by write */
633+
};
634+
};
625635
};
626636

627637
/*

0 commit comments

Comments
 (0)