This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux 2.6 nanosecond time stamp weirdness breaks GCC build
- From: Jörn Engel <joern at wohnheim dot fh-wedel dot de>
- To: Andrew Morton <akpm at osdl dot org>
- Cc: Andi Kleen <ak at suse dot de>, weigand at i1 dot informatik dot uni-erlangen dot de, gcc at gcc dot gnu dot org, linux-kernel at vger dot kernel dot org, schwidefsky at de dot ibm dot com
- Date: Mon, 7 Jun 2004 18:03:33 +0200
- Subject: Re: Linux 2.6 nanosecond time stamp weirdness breaks GCC build
- References: <200404011928.VAA23657@faui1d.informatik.uni-erlangen.de> <20040401220957.5f4f9ad2.ak@suse.de> <20040401163715.3592cedc.akpm@osdl.org>
On Thu, 1 April 2004 16:37:15 -0800, Andrew Morton wrote:
>
> I think this will cause the inode timestamps to keep on creeping forwards.
>
> How about in ext3_read_inode() you do:
>
> inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime);
> inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime);
> inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime);
> - inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
> + inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 999999999;
Coming in way too late, how about changing the other end? Each
filesystem provides a new function that transforms high resolution
time into whatever the filesystem can store. If the function is NULL,
we use a sane default like above.
- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
If the user never sees the high resolution in the first place, we
don't need to play guessing games later, after data has been flushed
from the page cache.
Jörn
--
The competent programmer is fully aware of the strictly limited size of
his own skull; therefore he approaches the programming task in full
humility, and among other things he avoids clever tricks like the plague.
-- Edsger W. Dijkstra