kern/77904: NFS server should set VA_UTIMES_NULL in a v3SETATTR
if both the accessed and modified times are NFSV3SATTRTIME_TOSERVER
Guy Harris
guy at alum.mit.edu
Tue Feb 22 05:10:24 GMT 2005
The following reply was made to PR kern/77904; it has been noted by GNATS.
From: Guy Harris <guy at alum.mit.edu>
To: freebsd-gnats-submit at FreeBSD.org
Cc:
Subject: Re: kern/77904: NFS server should set VA_UTIMES_NULL in a v3 SETATTR
if both the accessed and modified times are NFSV3SATTRTIME_TOSERVER
Date: Mon, 21 Feb 2005 21:05:55 -0800
NetBSD's nfsm_srvsattr() does
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
switch (fxdr_unsigned(int, *tl)) { \
case NFSV3SATTRTIME_TOCLIENT: \
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \
fxdr_nfsv3time(tl, &(a)->va_atime); \
break; \
case NFSV3SATTRTIME_TOSERVER: \
(a)->va_atime.tv_sec = time.tv_sec; \
(a)->va_atime.tv_nsec = time.tv_usec * 1000; \
(a)->va_vaflags |= VA_UTIMES_NULL; \
break; \
}; \
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
switch (fxdr_unsigned(int, *tl)) { \
case NFSV3SATTRTIME_TOCLIENT: \
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \
fxdr_nfsv3time(tl, &(a)->va_mtime); \
(a)->va_vaflags &= ~VA_UTIMES_NULL; \
break; \
case NFSV3SATTRTIME_TOSERVER: \
(a)->va_mtime.tv_sec = time.tv_sec; \
(a)->va_mtime.tv_nsec = time.tv_usec * 1000; \
(a)->va_vaflags |= VA_UTIMES_NULL; \
break; \
}; }
More information about the freebsd-bugs
mailing list