[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Re: Check nano seconds (nsec) to accurate; extract of sym-lin

From: Paul Eggert
Subject: [Bug-tar] Re: Check nano seconds (nsec) to accurate; extract of sym-links fails
Date: Tue, 19 Sep 2006 14:26:00 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Raphael Bossek" <address@hidden> writes:

> --- tar-1.15.91.orig/src/extract.c
> +++ tar-1.15.91/src/extract.c
> @@ -918,7 +918,7 @@
>             for (; ds; ds = ds->next)
>               if (ds->dev == st1.st_dev
>                   && ds->ino == st1.st_ino
> -                 && timespec_cmp (ds->mtime, get_stat_mtime (&st1)) == 0)
> +                 && tar_timespec_cmp (ds->mtime, get_stat_mtime (&st1)) == 0)
>                 {
>                   struct string_list *p =  xmalloc (offsetof (struct 
> string_list, string)
>                                                     + strlen (file_name) + 1);

That sort of patch doesn't look correct to me, as it is comparing two
time stamps both gotten by 'stat' or 'lstat'.  They should be
consistent, even if the underlying file system does not have
full timestamp resolution.

Possibly your kernel temporarily remembers subsecond time stamp
resolution, so long as the inode is cached, but forgets it once it's
sent to disk?  That might explain the problem.  But that would be a
kernel bug, not a tar bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]