diff options
-rw-r--r-- | sys/nfs/nfsproto.h | 32 | ||||
-rw-r--r-- | sys/nfs4client/nfs4_subs.c | 9 | ||||
-rw-r--r-- | sys/nfs4client/nfs4_vn_subs.c | 2 |
3 files changed, 27 insertions, 16 deletions
diff --git a/sys/nfs/nfsproto.h b/sys/nfs/nfsproto.h index 2da7a66..aa2057c 100644 --- a/sys/nfs/nfsproto.h +++ b/sys/nfs/nfsproto.h @@ -508,6 +508,7 @@ struct nfsv4_fattr { uint32_t fa4_rdev_major; uint32_t fa4_rdev_minor; struct timespec fa4_atime; + struct timespec fa4_btime; struct timespec fa4_ctime; struct timespec fa4_mtime; uint64_t fa4_maxread; @@ -533,21 +534,22 @@ struct nfsv4_fattr { #define FA4V_GID 0x00000040 #define FA4V_RDEV 0x00000080 #define FA4V_ATIME 0x00000100 -#define FA4V_CTIME 0x00000200 -#define FA4V_MTIME 0x00000400 -#define FA4V_MAXREAD 0x00000800 -#define FA4V_MAXWRITE 0x00001000 -#define FA4V_TYPE 0x00002000 -#define FA4V_FFREE 0x00004000 -#define FA4V_FTOTAL 0x00008000 -#define FA4V_MAXNAME 0x00010000 -#define FA4V_SAVAIL 0x00020000 -#define FA4V_SFREE 0x00040000 -#define FA4V_STOTAL 0x00080000 -#define FA4V_CHANGEID 0x00100000 -#define FA4V_LEASE_TIME 0x00200000 -#define FA4V_MAXFILESIZE 0x00400000 -#define FA4V_ACL 0x00800000 +#define FA4V_BTIME 0x00000200 +#define FA4V_CTIME 0x00000400 +#define FA4V_MTIME 0x00000800 +#define FA4V_MAXREAD 0x00001000 +#define FA4V_MAXWRITE 0x00002000 +#define FA4V_TYPE 0x00004000 +#define FA4V_FFREE 0x00008000 +#define FA4V_FTOTAL 0x00010000 +#define FA4V_MAXNAME 0x00020000 +#define FA4V_SAVAIL 0x00040000 +#define FA4V_SFREE 0x00080000 +#define FA4V_STOTAL 0x00100000 +#define FA4V_CHANGEID 0x00200000 +#define FA4V_LEASE_TIME 0x00400000 +#define FA4V_MAXFILESIZE 0x00800000 +#define FA4V_ACL 0x01000000 /* Offsets into bitmask */ #define FA4_SUPPORTED_ATTRS 0 diff --git a/sys/nfs4client/nfs4_subs.c b/sys/nfs4client/nfs4_subs.c index 739e39f..a08240a 100644 --- a/sys/nfs4client/nfs4_subs.c +++ b/sys/nfs4client/nfs4_subs.c @@ -129,8 +129,10 @@ nfsm_v4init(void) FA4_SET(FA4_OWNER, __getattr_bm); FA4_SET(FA4_OWNER_GROUP, __getattr_bm); FA4_SET(FA4_FILEID, __getattr_bm); - FA4_SET(FA4_TIME_MODIFY, __getattr_bm); FA4_SET(FA4_TIME_ACCESS, __getattr_bm); + FA4_SET(FA4_TIME_CREATE, __getattr_bm); + FA4_SET(FA4_TIME_METADATA, __getattr_bm); + FA4_SET(FA4_TIME_MODIFY, __getattr_bm); FA4_SET(FA4_TYPE, __readdir_bm); FA4_SET(FA4_FSID, __readdir_bm); @@ -1343,6 +1345,11 @@ nfsm_v4dissect_attrs_xx(struct nfsv4_fattr *fa, struct mbuf **md, caddr_t *dpos) len += 3 * NFSX_UNSIGNED; } if (FA4_ISSET(FA4_TIME_CREATE, bmval)) { + NFSM_MTOTIME(fa->fa4_btime); + fa->fa4_valid |= FA4V_BTIME; + len += 3 * NFSX_UNSIGNED; + } + if (FA4_ISSET(FA4_TIME_METADATA, bmval)) { NFSM_MTOTIME(fa->fa4_ctime); fa->fa4_valid |= FA4V_CTIME; len += 3 * NFSX_UNSIGNED; diff --git a/sys/nfs4client/nfs4_vn_subs.c b/sys/nfs4client/nfs4_vn_subs.c index bd42d5e..317c7ff 100644 --- a/sys/nfs4client/nfs4_vn_subs.c +++ b/sys/nfs4client/nfs4_vn_subs.c @@ -121,6 +121,8 @@ nfs4_vnop_loadattrcache(struct vnode *vp, struct nfsv4_fattr *fap, vap->va_fileid = nfs_v4fileid4_to_fileid(fap->fa4_fileid); if (fap->fa4_valid & FA4V_ATIME) vap->va_atime = fap->fa4_atime; + if (fap->fa4_valid & FA4V_BTIME) + vap->va_birthtime = fap->fa4_btime; if (fap->fa4_valid & FA4V_CTIME) vap->va_ctime = fap->fa4_ctime; vap->va_flags = 0; |