From ef087040b97216d20c84b8bfe400a4598dd9404c Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 20 Dec 2002 05:43:41 -0800 Subject: [PATCH] Support for NFSv4 READ + WRITE attribute cache consistency Retrieve the post-operation attribute changes for NFSv4 READ and WRITE operations. Unlike for NFSv2 and NFSv3, we do not retrieve the full set of file attributes. The main reason for this is that interpreting attributes is a much heavier task on NFSv4 (requiring, for instance, translation of file owner names into uids ...). Hence For a READ request, we retrieve only the 'change attribute' (for cache consistency checking) and the atime. For a WRITE request, we retrieve the 'change attribute' and the file size. In addition, we retrieve the value of the change attribute prior to the write operation, in order to be able to do weak cache consistency checking. --- include/linux/nfs_xdr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index fc4936d79426..2ed69a208fbe 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -35,8 +35,11 @@ struct nfs_fattr { struct timespec atime; struct timespec mtime; struct timespec ctime; +#ifdef CONFIG_NFS_V4 + __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */ __u64 change_attr; /* NFSv4 change attribute */ __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ +#endif unsigned long timestamp; }; -- cgit v1.2.3