Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934881AbdC3UD4 (ORCPT ); Thu, 30 Mar 2017 16:03:56 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35694 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934842AbdC3UDx (ORCPT ); Thu, 30 Mar 2017 16:03:53 -0400 MIME-Version: 1.0 In-Reply-To: <23410.1490902528@warthog.procyon.org.uk> References: <22214.1490895007@warthog.procyon.org.uk> <23410.1490902528@warthog.procyon.org.uk> From: John Stultz Date: Thu, 30 Mar 2017 13:03:50 -0700 Message-ID: Subject: Re: Apparent backward time travel in timestamps on file creation To: David Howells Cc: Linus Torvalds , Thomas Gleixner , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 16 On Thu, Mar 30, 2017 at 12:35 PM, David Howells wrote: > Linus Torvalds wrote: > >> The difference can be quite noticeable - basically the >> "gettimeofday()" time will interpolate within timer ticks, while >> "xtime" is just the truncated "time at timer tick" value _without_ the >> correction. > > Is there any way to determine the error bar, do you know? Or do I just make > up a fudge factor? Again, I'd utilize clock_gettime(CLOCK_REALTIME_COARSE, ...) for this instead of playing with fudge factors. thanks -john