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

Re: ctime/mtime with different filesystems



>From: Matt Wilson <msw@redhat.com>

>The only description of the fields I can come up with is SuS v2:

>http://www.opengroup.org/onlinepubs/7908799/xbd/glossary.html#tag_004_000_121

>Cheers,

>Matt

>On Fri, Jan 25, 2002 at 06:50:25PM +0100, Thorsten Kukuk wrote:
>>
>> For example, if you truncate a zero length file to zero, VFS only
>> send a notifier that ctime has to be updated. ext2 will also update
>> mtime, reiserfs not.
>> 
>> Is there a document describing the behaviour, to which I could point
>> our filesystem experts ?


A good idea is to just check what Solaris is doing as it behaves as UNIX
always did with UFS.

If you truncate a file, then of course the mtime gets updated. As for the
FS code there is no difference whether the file size is > 0 or == 0 before
the most reasonable behavior is to update mtime always when the file gets
truncated.

Jörg

 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.gmd.de		(work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix



Reply to: