What's up with those fractional-second mtimes?
Subsystems (2)
I'm trying to deploy a make-based build system to some x86_64 RHEL-4 ES boxes that mount their build directories NFS. I'm having problems because timestamps seem to be recorded in fractions of a second, but the timestamps aren't always copied that way with cp -a or gzip. Here is an example with gzip:
$ dd if=/dev/zero of=test bs=1024 count=1024 1024+0 records in 1024+0 records out $ stat test File: `test' Size: 1048576 Blocks: 2056 IO Block: 32768 regular file Device: 26h/38d Inode: 15119606 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.058211000 -0400 Modify: 2007-05-14 22:57:28.468235000 -0400 Change: 2007-05-14 22:57:28.468235000 -0400 $ gzip test $ stat test.gz File: `test.gz' Size: 1056 Blocks: 8 IO Block: 32768 regular file Device: 26h/38d Inode: 6176375 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.000000000 -0400 Modify: 2007-05-14 22:57:28.000000000 -0400 Change: 2007-05-14 22:57:49.431252000 -0400
See how the mtime didn't get propogated perfectly? The fraction after the decimal was truncated to zero! This seems to happen only on the x86_64 boxes.
What is up with that? Can I disable fractional timestamps? Can I enable proper processing of them?
Thanks,
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 26 lines · David Wuertele
I'm trying to deploy a make-based build system to some
x86_64RHEL-4 ES boxes that mount their build directories NFS. I'm having problems because timestamps seem to be recorded in fractions of a second, but the timestamps aren't always copied that way with cp -a or gzip. Here is an example with gzip:$ dd if=/dev/zero of=test bs=1024 count=1024 1024+0 records in 1024+0 records out $ stat test File: `test' Size: 1048576 Blocks: 2056 IO Block: 32768 regular file Device: 26h/38d Inode: 15119606 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.058211000 -0400 Modify: 2007-05-14 22:57:28.468235000 -0400 Change: 2007-05-14 22:57:28.468235000 -0400 $ gzip test $ stat test.gz File: `test.gz' Size: 1056 Blocks: 8 IO Block: 32768 regular file Device: 26h/38d Inode: 6176375 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.000000000 -0400 Modify: 2007-05-14 22:57:28.000000000 -0400 Change: 2007-05-14 22:57:49.431252000 -0400
Quoted 5 lines
See how the mtime didn't get propogated perfectly? The fraction after the decimal was truncated to zero! This seems to happen only on the
x86_64boxes.What is up with that? Can I disable fractional timestamps? Can I enable proper processing of them?
Sounds like a bug in 'cp'. Could you try using 'strace' to sniff if they are really using the 'utimes()' call (rather than the 'utime()' call, which only has a 1 second resolution) then sniff what they are sending as arguments?
Cheers
Trond
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Dave> Can I disable fractional timestamps? Can I enable proper Dave> processing of them?
Trond> Sounds like a bug in 'cp'. Could you try using 'strace' to sniff if they Trond> are really using the 'utimes()' call (rather than the 'utime()' call, Trond> which only has a 1 second resolution) then sniff what they are sending Trond> as arguments?
It is not just cp, it is gzip and several other commands (I doubt I could find them all) which use utime() instead of utimes().
Since I don't have control over the tools available on the target, I would like to just disable the fractional part of the timestamps altoghether, so that utime() returns the same as utimes().
Is that possible?
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 8 lines · David Wuertele
Dave> Can I disable fractional timestamps? Can I enable proper Dave> processing of them?
Trond> Sounds like a bug in 'cp'. Could you try using 'strace' to sniff if they Trond> are really using the '
utimes()' call (rather than the 'utime()' call, Trond> which only has a 1 second resolution) then sniff what they are sending Trond> as arguments?
Quoted 8 lines
It is not just cp, it is gzip and several other commands (I doubt I could find them all) which use
utime()instead ofutimes().Since I don't have control over the tools available on the target, I would like to just disable the fractional part of the timestamps altoghether, so that
utime()returns the same asutimes().Is that possible?
No. The you would have to do that on the server, not the client. Basically you'd have to have a mount option to the XFS/JFS/... filesystem that limits its time resolution. I'm not aware of any such mount options at this time.
Trond
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs