file creation timestamps wrong on msdos fs?

Rene Ladan r.c.ladan at gmail.com
Mon Nov 27 06:12:52 PST 2006


Oliver Fromme schreef:
> Rene Ladan wrote:
>  > rene at s000655:~>cd /media/stick
>  > rene at s000655:/media/stick>date && touch a-new-dos-file
>  > ma 27 nov 2006 10:53:59 CET
>  > rene at s000655:/media/stick>ls -lUT a-new-dos-file
>  > -rwxr-xr-x  1 rene  wheel  0  1 jan 01:11:23 1970 a-new-dos-file
>  >                                     ^^^^^^^^^^^^^
>  > 
> 
> There seems to be a bug in src/sys/fs/msdosfs/msdosfs_vnops.c
> because of a subtle confusion between what msdosfs calls
> "ctime" (creation time) and what UNIX calls "ctime" (inode
> change time, unsupported by msdosfs). 
> 
[...]

> That should fix the output of "ls -lUT" (please report).
Yep, with the file above:

rene at s000655:/media/stick>ls -lUT a-new-dos-file
-rwxr-xr-x  1 rene  wheel  0 27 nov 10:53:59 2006 a-new-dos-file

Time for yet another PR :)

> However, the question remains what the vnode's ctime should
> be set to.  There's no such thing as an inode change time
> in FAT's directory entries.  Maybe it should simply be
> copied from the mtime.
Maybe, but how can you see the inode change time anyway?

'man ls' and 'apropos inode' don't tell me.

> 
> Best regards
>    Oliver
> 
Regards,
Rene
-- 
GPG fingerprint = E738 5471 D185 7013 0EE0  4FC8 3C1D 6F83 12E1 84F6
(subkeys.pgp.net)

"It won't fit on the line."
		-- me, 2001



More information about the freebsd-fs mailing list