diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2002-11-18 06:27:49 -0800 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2002-11-18 06:27:49 -0800 |
| commit | 448cfb187d97284effb90217e004ef99ad8e8c38 (patch) | |
| tree | 99a1d1a325394f42a04f5185b9cd4efa37eec9de /include | |
| parent | 33ec2bbf7f2f2d83295e13d19b7aac3734a172f3 (diff) | |
[PATCH] Support for micro/nanosecond [acm]time in the NFS client
Given Andi Kleen's patch that introduces of VFS-level support for
nanosecond time resolutions, we should finally be able to export the
existing NFS client level support to userland.
In order to do so, the following patch will convert all NFS private 'raw
u64' values into the kernel-supported struct timespec directly in the
xdr_encode/xdr_decode routines.
It adds support for the nanosecond field in NFS 'setattr' calls, and in
nfs_refresh_inode().
Finally, there are a few cleanups in the nfs_refresh_inode code that
convert multiple use of the NFS_*(inode) macros into a single
dereference of NFS_I(inode).
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/nfs_fs.h | 18 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 12 |
2 files changed, 8 insertions, 22 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index d6f510d638d0..8d15e17c0b94 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -118,8 +118,8 @@ struct nfs_inode { * mtime != read_cache_mtime */ unsigned long read_cache_jiffies; - __u64 read_cache_ctime; - __u64 read_cache_mtime; + struct timespec read_cache_ctime; + struct timespec read_cache_mtime; __u64 read_cache_isize; unsigned long attrtimeo; unsigned long attrtimeo_timestamp; @@ -416,20 +416,6 @@ nfs_fileid_to_ino_t(u64 fileid) return ino; } -static inline time_t -nfs_time_to_secs(__u64 time) -{ - return (time_t)(time >> 32); -} - - -static inline u32 -nfs_time_to_nsecs(__u64 time) -{ - return time & 0xffffffff; -} - - /* NFS root */ extern void * nfs_root_data(void); diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 4bb5125056e7..6c82048e2acf 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -6,8 +6,8 @@ struct nfs_fattr { unsigned short valid; /* which fields are valid */ __u64 pre_size; /* pre_op_attr.size */ - __u64 pre_mtime; /* pre_op_attr.mtime */ - __u64 pre_ctime; /* pre_op_attr.ctime */ + struct timespec pre_mtime; /* pre_op_attr.mtime */ + struct timespec pre_ctime; /* pre_op_attr.ctime */ enum nfs_ftype type; /* always use NFSv2 types */ __u32 mode; __u32 nlink; @@ -32,9 +32,9 @@ struct nfs_fattr { } nfs4; } fsid_u; __u64 fileid; - __u64 atime; - __u64 mtime; - __u64 ctime; + struct timespec atime; + struct timespec mtime; + struct timespec ctime; __u64 change_attr; /* NFSv4 change attribute */ __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ unsigned long timestamp; @@ -219,7 +219,7 @@ struct nfs3_sattrargs { struct nfs_fh * fh; struct iattr * sattr; unsigned int guard; - __u64 guardtime; + struct timespec guardtime; }; struct nfs3_diropargs { |
