Subject: kern/2187: msdosfs w/Win95 support tries to keep access times
To: None <gnats-bugs@NetBSD.ORG>
From: Dave Huang <khym@spiff.bga.com>
List: netbsd-bugs
Date: 03/07/1996 06:03:39
>Number:         2187
>Category:       kern
>Synopsis:       msdosfs w/Win95 support tries to keep access times
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar  7 07:20:02 1996
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 20 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of March 6, 1996
>Environment:
	
System: NetBSD spiff.bga.com 1.1A NetBSD 1.1A (SPIFF) #26: Mon Mar 4 16:02:48 CST 1996 khym@spiff.bga.com:/usr/src/sys/arch/i386/compile/SPIFF i386


>Description:
The "caveats" section of the mount_msdos(8) manpage mentions that
Win95 does not handle access times, but msdosfs tries to save them
anyway.

I don't have any specs on the VFAT filesystem, but I have a feeling
that the reason for this is that there _is_ no space for the access
time in the directory entry, and those two bytes after the access date
are for something else.

The reason I think this is that CHKDSK under Windows NT 3.51 will
report "Unrecognized extended attribute handle" (or some similar
message) for every file I've accessed using msdosfs, and will then
clear the two bytes msdosfs stores the access time in to zero. Also,
when using the POSIX "ls" that comes with the NT Resource Kit to look
at the access date/times of files, all the files that haven't been
touched by msdosfs have access times of midnight, and the ones that
have been touched by msdosfs have random access times and often show
up as character special devices :)

However, I notice that Win95's SCANDISK doesn't complain about the
access time being set.

>How-To-Repeat:
Mount a MSDOS partition with the "-l" option, then more a file on it
(maybe it has to be a file that already has Win95 long filename info?)
Then boot into Windows NT and run chkdsk on the partition and watch it
complain.

>Fix:
I've hacked DE_INTERNALIZE and DE_EXTERNALIZE in denode.h to not mess
with the access time, as well as changing other files that reference
deATime, but I'll let someone who knows what they're doing decide if
it needs fixing and how :)
>Audit-Trail:
>Unformatted: