Subject: kern/25266: msdosfs namecache handling bug
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 04/21/2004 12:42:52
>Number:         25266
>Category:       kern
>Synopsis:       msdosfs namecache handling bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 21 03:44:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 2.0C
>Organization:

>Environment:
	
	
System: NetBSD 2.0C
>Description:
	msdosfs tries to deal with case-insensitive filenames and
	short/long filenames but namecache routines used by it doesn't.
>How-To-Repeat:
	1. create an negative cache entry.
		$ ls
		$ cat A
		cat: A: No such file or directory
	2. create a file named 'a', which is an alias name of 'A'.
		$ touch a
	3. however, you'll find a stale negative cache entry created in 1.
		$ cat A
		cat: A: No such file or directory
>Fix:
	one of the followings?
	- give up to use name cache.
	- make namei_hash and a filename compare routine overridable.
	- use normalized names for cache_lookup/enter.
	- implement a fs-specific version of cache_lookup/enter.
	- purge all negative entries in the directory on every
	  create operations.

>Release-Note:
>Audit-Trail:
>Unformatted: