bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: cp bug?


From: Bob Proulx
Subject: Re: cp bug?
Date: Thu, 22 Jun 2006 19:36:42 -0600
User-agent: Mutt/1.5.9i

Alex wrote:
> I am having problems preserving timestamps when copying between local 
> filesystems and NFS mounts:
> 
> "cp --preserve=timestamps" will *not* preserve the timestamp, with no 
> error given.

Sounds like this (kernel) bug.  Here is a Debian report on it.

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340236
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351077

If it is the same as this bug then the fix IIRC is in the kernel here:

  
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=755c1e20cd2ad56e5c567fa05769eb98a3eef72b

> "rsync -t" *will* preserve the timestamp as expected. Here's what I've done:

Run 'strace' on both cp -p and rsync -t and you should find that cp is
using openat functionality and calling utime on /proc/self/fd/X and
rsync is calling utime on the filesystem path.

I think if you modify config.h and recompile without HAVE_FUTIMES that
you will avoid this problem.

  #undef HAVE_FUTIMES

> address@hidden:~$ cp --version
> cp (GNU coreutils) 5.94

You might as well grab the latest coreutils 5.96 while you are at it.

  http://lists.gnu.org/archive/html/coreutils-announce/2006-05/msg00001.html

> address@hidden:~$ uname -a
> Linux saturn 2.6.15-1-k7 #2 Mon Mar 6 15:42:39 UTC 2006 i686 GNU/Linux

I don't know at what release the kernel fix referenced will be
released or even if it has already been released.

Bob




reply via email to

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