aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-11 14:10:25 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-11 14:10:25 -0400
commit1ca277d88dafdbc3c5a69d32590e7184b9af6371 (patch)
tree8cd36f442796e7e83c1dfcd72a036846f1b3950f
parent9e6e70f8d8b6698e0017c56b86525aabe9c7cd4c (diff)
NFS: Shrink the struct nfs_fattr
We don't need the bitmap[] field anymore, since the 'valid' field tells us all we need to know about which attributes were filled in... Also move the pre-op attributes in order to improve the structure packing. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/nfs4xdr.c3
-rw-r--r--include/linux/nfs_xdr.h7
2 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 7d220da3db36..9f1df8361974 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -3002,9 +3002,6 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons
3002 if ((status = decode_attr_bitmap(xdr, bitmap)) != 0) 3002 if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
3003 goto xdr_error; 3003 goto xdr_error;
3004 3004
3005 fattr->bitmap[0] = bitmap[0];
3006 fattr->bitmap[1] = bitmap[1];
3007
3008 if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0) 3005 if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0)
3009 goto xdr_error; 3006 goto xdr_error;
3010 3007
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index b99295e07cdf..6013acb0131f 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -28,9 +28,6 @@ static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid
28 28
29struct nfs_fattr { 29struct nfs_fattr {
30 unsigned int valid; /* which fields are valid */ 30 unsigned int valid; /* which fields are valid */
31 __u64 pre_size; /* pre_op_attr.size */
32 struct timespec pre_mtime; /* pre_op_attr.mtime */
33 struct timespec pre_ctime; /* pre_op_attr.ctime */
34 enum nfs_ftype type; /* always use NFSv2 types */ 31 enum nfs_ftype type; /* always use NFSv2 types */
35 __u32 mode; 32 __u32 mode;
36 __u32 nlink; 33 __u32 nlink;
@@ -52,9 +49,11 @@ struct nfs_fattr {
52 struct timespec atime; 49 struct timespec atime;
53 struct timespec mtime; 50 struct timespec mtime;
54 struct timespec ctime; 51 struct timespec ctime;
55 __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */
56 __u64 change_attr; /* NFSv4 change attribute */ 52 __u64 change_attr; /* NFSv4 change attribute */
57 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ 53 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
54 __u64 pre_size; /* pre_op_attr.size */
55 struct timespec pre_mtime; /* pre_op_attr.mtime */
56 struct timespec pre_ctime; /* pre_op_attr.ctime */
58 unsigned long time_start; 57 unsigned long time_start;
59 unsigned long gencount; 58 unsigned long gencount;
60}; 59};