Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jan 2015 17:13:06 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Garrett Wollman <wollman@hergotha.csail.mit.edu>
Cc:        portmgr@FreeBSD.org, pluknet@FreeBSD.org, freebsd-arch@freebsd.org
Subject:   futimens/utimensat (was: Re: Change default VFS timestamp precision?)
Message-ID:  <20150103161306.GB46373@stack.nl>
In-Reply-To: <201412192012.sBJKC1rW086109@hergotha.csail.mit.edu>
References:  <201412161348.41219.jhb@freebsd.org> <77322.1418933100@critter.freebsd.dk> <77371.1418933642@critter.freebsd.dk> <7567696.mqJ3jgzJgL@ralph.baldwin.cx> <82135.1419010861@critter.freebsd.dk> <20141219194800.GA29107@stack.nl> <201412192012.sBJKC1rW086109@hergotha.csail.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 19, 2014 at 03:12:01PM -0500, Garrett Wollman wrote:
> In article <20141219194800.GA29107@stack.nl>, jilles@stack.nl writes:

> >Because there is no API to set timestamps with nanosecond resolution,
> >and therefore a cp -p copy of a file will appear older than the original
> >with 99.9% probability. I think that is undesirable.

> But that's something we can easily fix -- and should have done, years
> ago.  Why don't we just *do* that?

> Of course, in the case of NFS clients, where this issue is most
> severe, the RPCs are already defined.  The underlying VOP_SETATTR has
> no trouble with nanoseconds, either.  It's just a matter of providing
> a standard library interface (and associated system call(s)) to do it,
> and since Linux has already implemented this, we can just implement
> that interface and applications will get it "for free".

OK, I dusted off the old patch from pluknet@ and added many necessary
things.

Please review at https://reviews.freebsd.org/D1426

I added a compatibility wrapper, mainly to save portmgr some work. Of
course, this does not add to the old kernel a version of lutimes() that
works relative to a file descriptor.

I also have changes for cp, mv and more utilities, but that's a
different patch. There is also contrib code that either only supports
old calls or is explicitly configured to use only old calls.

-- 
Jilles Tjoelker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150103161306.GB46373>