Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-13 Thread bytevolcano
On Tue, 11 Apr 2017 16:41:16 -0600 "Theo de Raadt" wrote: > > Note that I have noatime on this FS. > > Maybe we should remove this broken feature. > I would love to know what is broken about it, so I can investigate this and disable it on my systems if it's too risky

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread bytevolcano
On Tue, 11 Apr 2017 19:39:28 -0700 Philip Guenther wrote: > The 'issue' is that he's changing the parent of a directory and that > means it has to update the ".." link inside the directory, so it > alters the directory contents and the mtime is thus updated. That explains a

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread Philip Guenther
On Tue, Apr 11, 2017 at 6:53 PM, Bob Beck wrote: > >> Note that I have noatime on this FS. > > then turn that off, or understand that things will not behave as you expect > them to with it on. Nah, the noatime is a red herring, nicely smeared across the evidence trail here.

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread Bob Beck
> Note that I have noatime on this FS. then turn that off, or understand that things will not behave as you expect them to with it on.

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread bytevolcano
Sorry I was copying this out from a VM, so I ended up typing it up wrong here: $ mkdir Foo $ touch -t 2101 Foo $ ls -dlT Foo drwxr-xr-x 2 bob bob 512 Jan 1 00:00:00 2000 Foo $ ls -dluT Foo drwxr-xr-x 2 bob bob 512 Jan 1 00:00:00 2000 Foo $ mkdir Bar $ mv Foo Bar/ $ ls -dlT Bar/Foo

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread Theo de Raadt
> Note that I have noatime on this FS. Maybe we should remove this broken feature.

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread bytevolcano
On Tue, 11 Apr 2017 16:54:29 +0200 Ingo Schwarze wrote: > Hi, > > bytevolc...@safe-mail.net wrote on Fri, Apr 07, 2017 at 12:25:10PM > +1000: > > > Although mv(1) will preserve atime and mtime for moved directories > > if moved to a different file system, it doesn't preserve

Re: patch: mv(1): Add -p flag to preserve time stamps for moved directories

2017-04-11 Thread Ingo Schwarze
Hi, bytevolc...@safe-mail.net wrote on Fri, Apr 07, 2017 at 12:25:10PM +1000: > Although mv(1) will preserve atime and mtime for moved directories if > moved to a different file system, it doesn't preserve them when moved > in the same file system. Cannot reproduce. $ mkdir Foo $ touch