Add some missing parts for supporting va_birthtime.
Reviewed by: rmacklem
This commit is contained in:
parent
fc0804f18b
commit
c07782e10e
@ -594,6 +594,8 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vattr *vap,
|
||||
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEACCESSSET);
|
||||
if (vap->va_mtime.tv_sec != VNOVAL)
|
||||
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEMODIFYSET);
|
||||
if (vap->va_birthtime.tv_sec != VNOVAL)
|
||||
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMECREATE);
|
||||
(void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0,
|
||||
&attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0, NULL);
|
||||
break;
|
||||
@ -2043,8 +2045,15 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
break;
|
||||
case NFSATTRBIT_TIMECREATE:
|
||||
NFSM_DISSECT(tl, u_int32_t *, NFSX_V4TIME);
|
||||
if (compare && !(*retcmpp))
|
||||
*retcmpp = NFSERR_ATTRNOTSUPP;
|
||||
fxdr_nfsv4time(tl, &temptime);
|
||||
if (compare) {
|
||||
if (!(*retcmpp)) {
|
||||
if (!NFS_CMPTIME(temptime, nap->na_btime))
|
||||
*retcmpp = NFSERR_NOTSAME;
|
||||
}
|
||||
} else if (nap != NULL) {
|
||||
nap->na_btime = temptime;
|
||||
}
|
||||
attrsum += NFSX_V4TIME;
|
||||
break;
|
||||
case NFSATTRBIT_TIMEDELTA:
|
||||
|
@ -649,6 +649,7 @@ struct nfsvattr {
|
||||
#define na_atime na_vattr.va_atime
|
||||
#define na_mtime na_vattr.va_mtime
|
||||
#define na_ctime na_vattr.va_ctime
|
||||
#define na_btime na_vattr.va_birthtime
|
||||
#define na_gen na_vattr.va_gen
|
||||
#define na_flags na_vattr.va_flags
|
||||
#define na_rdev na_vattr.va_rdev
|
||||
|
@ -1127,6 +1127,7 @@ struct nfsv3_sattr {
|
||||
NFSATTRBM_SPACETOTAL | \
|
||||
NFSATTRBM_SPACEUSED | \
|
||||
NFSATTRBM_TIMEACCESS | \
|
||||
NFSATTRBM_TIMECREATE | \
|
||||
NFSATTRBM_TIMEDELTA | \
|
||||
NFSATTRBM_TIMEMETADATA | \
|
||||
NFSATTRBM_TIMEMODIFY | \
|
||||
@ -1176,6 +1177,7 @@ struct nfsv3_sattr {
|
||||
(NFSATTRBM_MODE | \
|
||||
NFSATTRBM_OWNER | \
|
||||
NFSATTRBM_OWNERGROUP | \
|
||||
NFSATTRBM_TIMECREATE | \
|
||||
NFSATTRBM_TIMEACCESSSET | \
|
||||
NFSATTRBM_TIMEMODIFYSET)
|
||||
#define NFSATTRBIT_SETABLE2 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user