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

FCOOKIE_CACHE: serious problems with stale data



There is a serious problem with the cookie cache: if two different
file names are used that the filesystem treats the same (because of
truncation) the cache can contain stale data, resulting in incorrect
file name lookup. Consider the following:

- the file system truncates file names to 14 characters
- a file with the name "long-name-foo-bar" is created
- some operations are done via this name to create an entry in the
  cache
- the file is removed via the name "long-name-foo-" -- the cache still
  contains the cookie for "long-name-foo-bar"
- a new file is created with the name "short-name", getting the same
  inode and therefore the same cookie.
- again some operation on "short-name" creates a new entry in the
  cookie cache

The cache now contains two entries with different names but the same
cookie, which is already bad enough, but you can now open the file
"short-name" via the name "long-file-foo-bar" although this file name
does not exist! The cache information disagrees with the file system,
which will certainly lead to total confusion!

Until this problem is fixed the file cookie cache should be disabled.

-- 
Andreas Schwab                                      "And now for something
schwab@ls5.informatik.uni-dortmund.de                completely different"