Closed GoogleCodeExporter closed 8 years ago
I have the same problem with TextMate on a PowerPC Mac
Original comment by mart...@gmail.com
on 16 Jan 2007 at 3:05
Original comment by si...@gmail.com
on 17 Jan 2007 at 2:27
Looks like there's some variation of strange atime/mtime/ctime related behavior
on remote/non-HFS+ file
systems. Haven't had the time to do detailed debugging, but looks like TextEdit
etc. do call utimes() with a "bad"
tv[0] or tv[1] under certain circumstances. Try the same experiment on an NFS
volume. Do a "stat -x" of the file
in question before and after writing to it. Note the various time values.
Original comment by si...@gmail.com
on 17 Jan 2007 at 8:43
OK yeah, it does look like TextEdit is calling utimes() with a zero m_time (but
correct atime). I can't see lstat()
or similar returning any zero mtime values for the original file, and
getattrlist() doesn't seem to be getting
used for ATTR_CMN_MODTIME on sshfs paths. Maybe it's a Carbon File Manager
issue?
The call:
utimes path '/Users/matt/mnt/ucc/tmp/1000', atime sec 1169041147 usec 0, mtime
sec 0 usec 0
Trying with NFS, I'm seeing strange behaviour where the atime starts at 1 and
then increases by 1 each time
for every utimes() on that fs. The counter even persists between mounts. I have
a suspicion that it could be
the linux NFS server though. The mtime always seems correct for NFS - probably
not the same thing as sshfs?
utimes path '/Users/matt/mnt/drone-nfs/2000', atime sec 8 usec 0, mtime sec
1169040202 usec 0
I've attached the dyld preload library hack I'm using.
sshfs before:
File: "1000"
Size: 17 FileType: Regular File
Mode: (0600/-rw-------) Uid: (11154/ (11154)) Gid: ( 0/ wheel)
Device: 44,39 Inode: 651 Links: 1
Access: Wed Jan 17 22:28:20 2007
Modify: Wed Jan 17 22:28:20 2007
Change: Thu Jan 1 08:00:00 1970
sshfs after:
File: "1000"
Size: 19 FileType: Regular File
Mode: (0600/-rw-------) Uid: (11154/ (11154)) Gid: ( 0/ wheel)
Device: 44,39 Inode: 803 Links: 1
Access: Wed Jan 17 22:39:07 2007
Modify: Thu Jan 1 08:00:00 1970
Change: Thu Jan 1 08:00:00 1970
nfs before:
File: "2000"
Size: 16 FileType: Regular File
Mode: (0600/-rw-------) Uid: ( 501/ matt) Gid: ( 501/ matt)
Device: 26,40 Inode: 4849975 Links: 1
Access: Wed Jan 17 22:22:34 2007
Modify: Wed Jan 17 22:22:34 2007
Change: Wed Jan 17 22:22:34 2007
nfs after:
File: "2000"
Size: 18 FileType: Regular File
Mode: (0600/-rw-------) Uid: ( 501/ matt) Gid: ( 501/ matt)
Device: 26,40 Inode: 4849976 Links: 1
Access: Thu Jan 1 08:00:08 1970
Modify: Wed Jan 17 22:23:22 2007
Change: Wed Jan 17 22:23:23 2007
Original comment by matt.gtalkfix@gmail.com
on 17 Jan 2007 at 1:49
Attachments:
I noticed this behavior in JEdit as well. I ran a 'touch filename' on my client
machine terminal in my mounted sshfs dir and it updated the modified date to the
correct date and time.
Saved in JEdit:
stat -x File.php
File: "File.php"
Size: 14401 FileType: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 523/ (523)) Gid: ( 524/ (524))
Device: 44,7 Inode: 692 Links: 1
Access: Wed Jan 17 11:30:36 2007
Modify: Wed Dec 31 19:00:00 1969
Change: Wed Dec 31 19:00:00 1969
# touch File.php
stat -x File.php
File: "File.php"
Size: 14401 FileType: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 523/ (523)) Gid: ( 524/ (524))
Device: 44,7 Inode: 692 Links: 1
Access: Wed Jan 17 11:33:02 2007
Modify: Wed Jan 17 11:33:02 2007
Change: Wed Dec 31 19:00:00 1969
Original comment by steve.b...@gmail.com
on 17 Jan 2007 at 4:35
Something to try: in the kext source, please see if commenting out the line
containing ATTR_CMN_MODTIME in
fuse_vfsops.c changes the behavior.
Original comment by si...@gmail.com
on 17 Jan 2007 at 5:32
ATTR_CMN_MODTIME is commented out in the current source version. It appears
the issue is resolved when
compiled from the repository.
Great Work!
Original comment by bern...@gmail.com
on 18 Jan 2007 at 6:50
Commenting out ATTR_CMN_MODTIME fixed the problem for me too.
Excellent stuff
Original comment by mart...@gmail.com
on 18 Jan 2007 at 3:04
Original comment by si...@gmail.com
on 19 Jan 2007 at 8:35
Original issue reported on code.google.com by
matt.gtalkfix@gmail.com
on 16 Jan 2007 at 2:36Attachments: