Re: svn commit: r285885 - head/sys/fs/tmpfs
On 7/26/15 10:41 AM, Konstantin Belousov wrote: > On Sun, Jul 26, 2015 at 08:33:47AM +, Christian Brueffer wrote: >> Author: brueffer >> Date: Sun Jul 26 08:33:46 2015 >> New Revision: 285885 >> URL: https://svnweb.freebsd.org/changeset/base/285885 >> >> Log: >> In tmpfs_chtimes(), remove checks on the nanosecond level when >> determining whether a node changed. > No, these are checks to see if the userspace requested an update to the > corresponding inode time and supplied valid time. > > I.e. the code change is right, but the commit message is misleading. Ah, sorry for the misunderstanding. I'll do a forced commit to clarify the message later today. Thanks for the help! Chris signature.asc Description: OpenPGP digital signature
Re: svn commit: r285885 - head/sys/fs/tmpfs
On Sun, Jul 26, 2015 at 08:33:47AM +, Christian Brueffer wrote: > Author: brueffer > Date: Sun Jul 26 08:33:46 2015 > New Revision: 285885 > URL: https://svnweb.freebsd.org/changeset/base/285885 > > Log: > In tmpfs_chtimes(), remove checks on the nanosecond level when > determining whether a node changed. No, these are checks to see if the userspace requested an update to the corresponding inode time and supplied valid time. I.e. the code change is right, but the commit message is misleading. > > Other filesystems, e.g., UFS, only check on seconds, when determining > whether something changed. > > This also corrects the birthtime case, where we checked tv_nsec > twice, instead of tv_sec and tv_nsec (PR). > > PR: 201284 > Submitted by: David Binderman > Patch suggested by: kib > Reviewed by:kib > MFC after: 2 weeks > Committed from: Essen FreeBSD Hackathon > > Modified: > head/sys/fs/tmpfs/tmpfs_subr.c > > Modified: head/sys/fs/tmpfs/tmpfs_subr.c > == > --- head/sys/fs/tmpfs/tmpfs_subr.cSun Jul 26 00:11:04 2015 > (r285884) > +++ head/sys/fs/tmpfs/tmpfs_subr.cSun Jul 26 08:33:46 2015 > (r285885) > @@ -1709,20 +1709,18 @@ tmpfs_chtimes(struct vnode *vp, struct v > if (error != 0) > return (error); > > - if (vap->va_atime.tv_sec != VNOVAL && vap->va_atime.tv_nsec != VNOVAL) > + if (vap->va_atime.tv_sec != VNOVAL) > node->tn_status |= TMPFS_NODE_ACCESSED; > > - if (vap->va_mtime.tv_sec != VNOVAL && vap->va_mtime.tv_nsec != VNOVAL) > + if (vap->va_mtime.tv_sec != VNOVAL) > node->tn_status |= TMPFS_NODE_MODIFIED; > > - if (vap->va_birthtime.tv_nsec != VNOVAL && > - vap->va_birthtime.tv_nsec != VNOVAL) > + if (vap->va_birthtime.tv_sec != VNOVAL) > node->tn_status |= TMPFS_NODE_MODIFIED; > > tmpfs_itimes(vp, &vap->va_atime, &vap->va_mtime); > > - if (vap->va_birthtime.tv_nsec != VNOVAL && > - vap->va_birthtime.tv_nsec != VNOVAL) > + if (vap->va_birthtime.tv_sec != VNOVAL) > node->tn_birthtime = vap->va_birthtime; > MPASS(VOP_ISLOCKED(vp)); > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r285885 - head/sys/fs/tmpfs
Author: brueffer Date: Sun Jul 26 08:33:46 2015 New Revision: 285885 URL: https://svnweb.freebsd.org/changeset/base/285885 Log: In tmpfs_chtimes(), remove checks on the nanosecond level when determining whether a node changed. Other filesystems, e.g., UFS, only check on seconds, when determining whether something changed. This also corrects the birthtime case, where we checked tv_nsec twice, instead of tv_sec and tv_nsec (PR). PR: 201284 Submitted by: David Binderman Patch suggested by: kib Reviewed by: kib MFC after:2 weeks Committed from: Essen FreeBSD Hackathon Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c == --- head/sys/fs/tmpfs/tmpfs_subr.c Sun Jul 26 00:11:04 2015 (r285884) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sun Jul 26 08:33:46 2015 (r285885) @@ -1709,20 +1709,18 @@ tmpfs_chtimes(struct vnode *vp, struct v if (error != 0) return (error); - if (vap->va_atime.tv_sec != VNOVAL && vap->va_atime.tv_nsec != VNOVAL) + if (vap->va_atime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_ACCESSED; - if (vap->va_mtime.tv_sec != VNOVAL && vap->va_mtime.tv_nsec != VNOVAL) + if (vap->va_mtime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; - if (vap->va_birthtime.tv_nsec != VNOVAL && - vap->va_birthtime.tv_nsec != VNOVAL) + if (vap->va_birthtime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; tmpfs_itimes(vp, &vap->va_atime, &vap->va_mtime); - if (vap->va_birthtime.tv_nsec != VNOVAL && - vap->va_birthtime.tv_nsec != VNOVAL) + if (vap->va_birthtime.tv_sec != VNOVAL) node->tn_birthtime = vap->va_birthtime; MPASS(VOP_ISLOCKED(vp)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"