aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2005-04-16 23:47:19 +0000
committerDavid Schultz <das@FreeBSD.org>2005-04-16 23:47:19 +0000
commit23e8fcaf66e15fbd9ea9c146f3e3633c6fb7d089 (patch)
tree31342c84b1c18cf3b53dff0fff069431dec9eac4 /sys/fs
parent02b47ea204cc9d918bd56c53e5b1da578a6372e5 (diff)
downloadsrc-23e8fcaf66e15fbd9ea9c146f3e3633c6fb7d089.tar.gz
src-23e8fcaf66e15fbd9ea9c146f3e3633c6fb7d089.zip
Disable negative name caching for msdosfs to work around a bug.
Since the name cache is case-sensitive and msdosfs isn't, creating a file 'foo' won't invalidate a negative entry for 'FOO'. There are similar problems related to 8.3 filenames. A better solution is to override VOP_LOOKUP with a method that canonicalizes the name, then calls vfs_cache_lookup(). Unfortunately, it's not quite that simple because vfs_cache_lookup() will call msdosfs_lookup() on a cache miss, and msdosfs_lookup() needs a way to get at the original component name.
Notes
Notes: svn path=/head/; revision=145174
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index 5f3e137e1c21..a16881e9a8fc 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -380,11 +380,18 @@ notfound:
cnp->cn_flags |= SAVENAME;
return (EJUSTRETURN);
}
+#if 0
/*
* Insert name into cache (as non-existent) if appropriate.
+ *
+ * XXX Negative caching is broken for msdosfs because the name
+ * cache doesn't understand peculiarities such as case insensitivity
+ * and 8.3 filenames. Hence, it may not invalidate all negative
+ * entries if a file with this name is later created.
*/
if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
cache_enter(vdp, *vpp, cnp);
+#endif
return (ENOENT);
found: