Ingo Brückl
2016-Jan-20 11:58 UTC
[PATCH] Consider nanoseconds when quick-checking for unchanged files
I wrote on Fri, 02 Jan 2015 16:02:27 +0100:> --- a/generator.c 2014-06-14 01:05:08.000000000 +0200 > +++ b/generator.c 2015-01-02 15:50:30.000000000 +0100 > @@ -588,7 +588,14 @@ > if (ignore_times) > return 0;> - return cmp_time(st->st_mtime, file->modtime) == 0; > + return cmp_time(st->st_mtime, file->modtime) == 0 > +#ifdef ST_MTIME_NSEC > + ? st->st_mtime == file->modtime > + && NSEC_BUMP(file) ? (uint32)st->ST_MTIME_NSEC => F_MOD_NSEC(file) > + : 1 > + : 0 > +#endif > + ; > }Ping? Unfortunately, there weren't any comments yet. Ingo
Andrey Gursky
2016-Jan-20 13:49 UTC
[PATCH] Consider nanoseconds when quick-checking for unchanged files
On Wed, 20 Jan 2016 12:58:51 +0100 Ingo Brückl <ib at wupperonline.de> wrote:> I wrote on Fri, 02 Jan 2015 16:02:27 +0100: > > > --- a/generator.c 2014-06-14 01:05:08.000000000 +0200 > > +++ b/generator.c 2015-01-02 15:50:30.000000000 +0100 > > @@ -588,7 +588,14 @@ > > if (ignore_times) > > return 0; > > > - return cmp_time(st->st_mtime, file->modtime) == 0; > > + return cmp_time(st->st_mtime, file->modtime) == 0 > > +#ifdef ST_MTIME_NSEC > > + ? st->st_mtime == file->modtime > > + && NSEC_BUMP(file) ? (uint32)st->ST_MTIME_NSEC => > F_MOD_NSEC(file) > > + : 1 > > + : 0 > > +#endif > > + ; > > } > > Ping? > > Unfortunately, there weren't any comments yet.Ingo, I was just about to implement the same, since nanoseconds are taken into account when transferring, thus making it obvious not to ignore them when comparing. However I believe the time_cmp() function should be extended and a few more code adjustments would be needed, which... you also already addressed in a previously mail. Regards, Andrey
Paul Slootman
2016-Jan-20 15:17 UTC
[PATCH] Consider nanoseconds when quick-checking for unchanged files
On Wed 20 Jan 2016, Andrey Gursky wrote:> > I was just about to implement the same, since nanoseconds are taken > into account when transferring, thus making it obvious not to ignoreReally? I thought the protocol only transmits seconds. Paul
Possibly Parallel Threads
- [PATCH] Consider nanoseconds when quick-checking for unchanged files
- [PATCH] Consider nanoseconds when quick-checking for unchanged files
- [PATCH] Consider nanoseconds when quick-checking for unchanged files
- [Bug 11521] New: rsync does not use high-resolution timestamps to determine file differences
- [Bug 11635] New: make fails for out-of-tree build