bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp -u vs. vfat's TWO seconds


From: Eric Blake
Subject: Re: cp -u vs. vfat's TWO seconds
Date: Thu, 3 Apr 2008 15:42:50 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

 <jidanni <at> jidanni.org> writes:

> JM> Don't blame Linux 
> JM> This is due to the FAT specification.
> Different filesystems have different time granularities. Why draw an
> artificial line above one second just because it is unfamiliar?

FAT is not a POSIX-compliant file system.  POSIX requires file systems to have 
a granularity of 1 second or less.  If anything, the conspiricy to wear out USB 
memory sticks faster is due to a rather poor industry decision to use such a 
stupid file system as the default.

That said, a lot of the problem is that most existing OS's don't provide easy 
access to what the underlying granularity of the current file system is.  The 
next version of POSIX is adding fpathconf(n,_PC_TIMESTAMP_RESOLUTION) to solve 
this problem, but it is not widely implemented yet.  If excess wear on your non-
compliant file system really bothers you that much, then consider submitting a 
patch that provides a replacement fpathconf for systems that don't yet 
implement _PC_TIMESTAMP_RESOLUTION, and which then teaches cp to use fpathconf 
to get the truncation right even with your 2-second resolution file system.

-- 
Eric Blake






reply via email to

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