1. 29 May, 2002 1 commit
    • Anton Altaparmakov's avatar
      NTFS: 2.0.8 release. Major updates for dcache aliasing issues wrt short/long file names. · ccc55c48
      Anton Altaparmakov authored
      In order to handle the case insensitivity issues of NTFS with regards to the
      dcache and the dcache requiring only one dentry per directory, we deal with
      dentry aliases that only differ in case in ->ntfs_lookup() while maintining
      a case sensitive dcache. This means that we get the full benefit of dcache
      speed when the file/directory is looked up with the same case as returned by
      ->ntfs_readdir() but that a lookup for any other case (or for the short file
      name) will not find anything in dcache and will enter ->ntfs_lookup()
      instead, where we search the directory for a fully matching file name
      (including case) and if that is not found, we search for a file name that
      matches with different case and if that has non-POSIX semantics we return
      that. We actually do only one search (case sensitive) and keep tabs on
      whether we have found a case insensitive match in the process.
      
      To simplify matters for us, we do not treat the short vs long filenames as
      two hard links but instead if the lookup matches a short filename, we
      return the dentry for the corresponding long filename instead.
      
      In ->ntfs_lookup() we distinguish three cases:
      
      1) @dent perfectly matches (i.e. including case) a directory entry with a
         file name in the WIN32 or POSIX namespaces. In this case
         ntfs_lookup_inode_by_name() will return with name set to NULL and we
         just d_add() @dent.
      2) @dent matches (not including case) a directory entry with a file name in
         the WIN32 namespace. In this case ntfs_lookup_inode_by_name() will return
         with name set to point to a kmalloc()ed ntfs_name structure containing
         the properly cased little endian Unicode name. We convert the name to the
         current NLS code page, search if a dentry with this name already exists
         and if so return that instead of @dent. The VFS will then destroy the old
         @dent and use the one we returned. If a dentry is not found, we allocate
         a new one, d_add() it, and return it as above.
      3) @dent matches either perfectly or not (i.e. we don't care about case) a
         directory entry with a file name in the DOS namespace. In this case
         ntfs_lookup_inode_by_name() will return with name set to point to a
         kmalloc()ed ntfs_name structure containing the mft reference (cpu endian)
         of the inode. We use the mft reference to read the inode and to find the
         file name in the WIN32 namespace corresponding to the matched short file
         name. We then convert the name to the current NLS code page, and proceed
         searching for a dentry with this name, etc, as in case 2), above.
      ccc55c48
  2. 28 May, 2002 1 commit
  3. 27 May, 2002 1 commit
  4. 26 May, 2002 1 commit
    • Anton Altaparmakov's avatar
      NTFS: The beginning of 2.0.8. - Major updates for handling of case sensitivity. · 6f3894e9
      Anton Altaparmakov authored
      - Remove unused source file fs/ntfs/attraops.c.
      - Remove show_inodes mount option(s), thus dropping support for
        displaying of short file names.
      - Remove deprecated mount option posix.
      - Restore show_sys_files mount option.
      - Add new mount option case_sensitive, to determine if the driver treats
        file names as case sensitive or not. If case sensitive, create file names
        in the POSIX namespace. Otherwise create file names in the WIN32
        namespace. By default, or when case_sensitive is set to FALSE, files
        remain accessible via their short file name, if it exists.
      - Add additional argument to ntfs_lookup_inode_by_name() in which we
        return information about the matching file name if the case is not
        matching or the match is a short file name. See comments above the
        function definition for details.
      6f3894e9
  5. 25 May, 2002 2 commits
  6. 24 May, 2002 34 commits