linux-old/Documentation/filesystems/ntfs.txt
<<
>>
Prefs
   1NTFS Overview
   2=============
   3
   4Legato Systems, Inc. (http://www.legato.com) have sponsored Anton Altaparmakov
   5to develop NTFS on Linux since June 2001.
   6
   7To mount an NTFS volume, use the filesystem type 'ntfs'. The driver
   8currently works only in read-only mode, with no fault-tolerance supported.
   9
  10If you enable the dangerous(!) write support, make sure you can recover
  11from a complete loss of data. Also, download the Linux-NTFS project
  12distribution from Sourceforge at http://sourceforge.net/projects/linux-ntfs/
  13and always run the included ntfsfix utility after performing a write to an
  14NTFS partition from Linux to fix some of the damage done by the Linux NTFS
  15driver and to schedule an automatic chkdsk when Windows reboots. You should
  16run ntfsfix _after_ unmounting the partition in Linux but _before_ rebooting
  17into Windows. During the next reboot into Windows, chkdsk will be run
  18automatically fixing the remaining damage. If no errors are found it is a
  19good indication that the driver + ntfsfix together worked to full
  20satisfaction. (-;
  21
  22Please note that the experimental write support is limited to Windows NT4 and
  23earlier versions at the moment.
  24
  25If you think you have discovered a bug please have look at the "Known bugs"
  26section below to see whether it isn't known already.
  27
  28For ftdisk support, limited success was reported with volume sets on top of
  29the md driver, although mirror and stripe sets should work as well - if the
  30md driver can be talked into using the same layout as Windows NT. However,
  31using the md driver will fail if any of your NTFS partitions have an odd
  32number of sectors.
  33
  34Supported mount options
  35=======================
  36
  37iocharset=name          Character set to use when returning file names.
  38                        Unlike VFAT, NTFS suppresses names that contain
  39                        unconvertible characters. Note that most character
  40                        sets contain insufficient characters to represent all
  41                        possible Unicode characters that can exist on NTFS. To
  42                        be sure you are not missing any files, you are advised
  43                        to use the iocharset=utf8 which should be capable of
  44                        representing all Unicode characters.
  45
  46utf8=<bool>             Use UTF-8 for converting file names. - It is preferable
  47                        to use iocharset=utf8 instead, but if the utf8 NLS is
  48                        not available, you can use this utf8 option, which
  49                        enables the driver's builtin utf8 conversion functions.
  50
  51uid=
  52gid=
  53umask=                  These options work as documented in mount(8).
  54                        By default, the files are owned by root and
  55                        not readable by anyone else.
  56
  57posix=<bool>            If enabled, the file system distinguishes between
  58                        upper and lower case. The 8.3 alias names are presented
  59                        as hard links instead of being suppressed.
  60
  61show_sys_files=<bool>   If enabled, show all system files as normal files. Note
  62                        that $MFT does not appear unless specifically
  63                        requested. For example in bash, use: "ls -l \$MFT".
  64                        Be careful not to write anything to them or you could
  65                        crash the kernel and/or corrupt your file system!
  66
  67mft_zone_multiplier=    Set the MFT zone multiplier for the volume (this
  68                        setting is not persistent across mounts and can be
  69                        changed from mount to mount but cannot be changed on
  70                        remount). Values of 1 to 4 are allowed, 1 being the
  71                        default. The MFT zone multiplier determines how much
  72                        space is reserved for the MFT on the volume. If all
  73                        other space is used up, then the MFT zone will be
  74                        shrunk dynamically, so this has no impact on the
  75                        amount of free space. However, it can have an impact
  76                        on performance by affecting fragmentation of the MFT.
  77                        In general use the default. If you have a lot of small
  78                        files then use a higher value. The values have the
  79                        following meaning:
  80                              Value          MFT zone size (% of volume size)
  81                                1               12.5%
  82                                2               25%
  83                                3               37.5%
  84                                4               50%
  85
  86Known bugs and (mis-)features
  87=============================
  88
  89- Do not use the driver for writing as it corrupts the file system. If you do
  90  use it, get the Linux-NTFS tools and use the ntfsfix utility after
  91  dismounting a partition you wrote to.
  92
  93- Writing of extension records is not supported properly.
  94
  95Please send bug reports/comments/feed back/abuse to the Linux-NTFS development
  96list at sourceforge: linux-ntfs-dev@lists.sourceforge.net
  97
  98ChangeLog
  99=========
 100
 101NTFS 1.1.21:
 102        - Fixed bug with reading $MFT where we try to read higher mft records
 103          before having read the $DATA attribute of $MFT. (Note this is only a
 104          partial solution which will only work in the case that the attribute
 105          list is resident or non-resident but $DATA is in the first 1024
 106          bytes. But this should be enough in the majority of cases. I am not
 107          going to bother fixing the general case until someone finds this to
 108          be a problem for them, which I doubt very much will ever happen...)
 109        - Fixed bogus BUG() call in readdir().
 110
 111NTFS 1.1.20:
 112        - Fixed two bugs in ntfs_readwrite_attr(). Thanks to Jan Kara for
 113          spotting the out of bounds one.
 114        - Check return value of set_blocksize() in ntfs_read_super() and make
 115          use of get_hardsect_size() to determine the minimum block size.
 116        - Fix return values of ntfs_vcn_to_lcn(). This should stop
 117          peoples start of partition being overwritten at random.
 118
 119NTFS 1.1.19:
 120        - Fixed ntfs_getdir_unsorted(), ntfs_readdir() and ntfs_printcb() to
 121          cope with arbitrary cluster sizes. Very important for Win2k+. Also,
 122          make them detect directories which are too large and truncate the
 123          enumeration pretending end of directory was reached. Detect more
 124          error conditions and overflows. All this fixes the problem where the
 125          driver could end up in an infinite loop under certain circumstances.
 126        - Fixed potential memory leaks in Unicode conversion functions and
 127          setup correct NULL return values.
 128
 129NTFS 1.1.18:
 130
 131        - Enhanced & bug fixed cluster deallocation (race fixes, etc.)
 132        - Complete rewrite of cluster allocation, now race free.
 133        - Fixed several bugs in the attribute modification codepaths.
 134        - Hopefully fixed bug where the first sectors of some people's
 135          partitions would be overwritten by the mft. And in general fixed up
 136          mft extension code a bit (still incomplete though).
 137        - Introduce splice_runlist() to allow generic splicing of two run
 138          lists into one.
 139        - MFT zone is now implemented. [Stage 2 of 3; only lack dynamic
 140          growing of mft zone but that is AFAIK not even done by Windows, and
 141          the overhead would be so large that it is probably not worth doing
 142          at all, so Stage 3 might never happen...]
 143        - Complete rewrite of $MFT extension and ntfs inode allocation code.
 144        - Made the NTFS driver initialization string show the compile options
 145          used (i.e. whether read-only or read-write, whether a module, and
 146          whether with debug support).
 147        - Modify ntfs_fill_mft_header() to set all fields and to accept more
 148          arguments.
 149        - Get rid of superfluous add_mft_header().
 150        - Get rid of some unused code.
 151        - Fixed several bugs in and generally cleaned up ntfs_readdir,
 152          ntfs_getdir_unsorted(), and ntfs_printcb. Now they spew out huge
 153          amounts of debug output if debugging is enabled. This will be
 154          removed once I know that this works for everyone.
 155        - ntfs_readdir now shows hidden files. The only files that are now
 156          hidden are the first 16 inodes (i.e. the hard coded system files),
 157          which is consistent with Windows NT4. Using the show_sys_files mount
 158          option, these files are then shown, too.
 159        - Fixed the displaying of the "." and ".." directories. We still cannot
 160          cope with more than 65536 files in a directory index block which is
 161          not a problem and we now cannot cope with more than 32766 directory
 162          index blocks which should not be a problem unless you have a
 163          directory with an insanely large number of files in it. The exact
 164          number depends on the length of the file names of the directory
 165          entries and on the size of the dircetory index blocks.
 166        - Fixed all problems with the last file in a directory (e.g. the last
 167          file should no longer disappear and tab completion should work). If
 168          there are still disappearing files or any other problems with the
 169          last file in a directory, please report them! Thanks.
 170        - Rewrote ntfs_extend_attr() to use the new cluster allocator and the
 171          freshly introduced splice_runlists() function. This simplified
 172          ntfs_extend_attr() a lot which in turn seems to have removed one or
 173          more bugs from it.
 174        - Probably other things I have forgotten... (-;
 175        - Removed dollar signs from the names in the system file enumeration.
 176          Apparently gcc doesn't support dollar signs on PPC architecture.
 177          (Andrzej Krzysztofowicz)
 178
 179NTFS 1.1.17:
 180
 181        - Fixed system file handling. No longer need to use show_sys_files
 182          option for driver to work fine. System files are now always treated
 183          the same, but without the option, they are made invisible to
 184          directory listings. As a result system files can once again be opened
 185          even without the show_sys_files option. This is important for the
 186          statfs system call to work properly, for example.
 187        - Implemented MFT zone including mount parameter to tune it (just like
 188          in Windows via the registry, only we make it per mount rather than
 189          global for the whole driver, so we are better but we have no way of
 190          storing the value as we don't have a registry so either specify on
 191          each mount or put it in /etc/fstab). [Stage 1 of 3, mount parameter
 192          handling.]
 193        - Fixed fixup functions to handle corruption cases and to return error
 194          codes to the caller.
 195        - Made fixup functions apply hotfixes where sensible. [Stage 1 of 2+,
 196          in memory only.]
 197        - Fixed ommission of "NTFS: " string in ntfs_error() output.
 198        - Fixed stupid if statement bug in unistr.c. Thanks to Yann E. Morin
 199          for spotting it. 
 200        - Get rid of all uses of max and min macros. This actually allowed for
 201          optimizing the code in several places so it was a Good Thing(TM).
 202        - Make ntfs use generic_file_open to enforce the O_LARGEFILE flag.
 203        - Detect encrypted files and refuse to access them (return EACCES
 204          error code to user space).
 205        - Fix handling of encrypted & compressed files so that an encrypted
 206          file no longer is considered to be compressed (this was causing
 207          kernel segmentation faults).
 208
 209NTFS 1.1.16:
 210
 211        - Removed non-functional uni_xlate mount options.
 212        - Clarified the semantics of the utf8 and iocharset mount options.
 213        - Threw out the non-functional mount options for using hard coded
 214          character set conversion. Only kept utf8 one.
 215        - Fixed handling of mount options and proper handling of faulty mount
 216          options on remount.
 217        - Cleaned up character conversion which basically became simplified a
 218          lot due to the removal of the above mentioned mount options.
 219        - Made character conversion to be always consistent. Previously we
 220          could output to the VFS file names which we would then not accept
 221          back from the VFS so in effect we were generating ghost entries in
 222          the directory listings which could not be accessed by any means.
 223        - Simplified time conversion functions drastically without sacrificing
 224          accuracy. (-8
 225        - Fixed a use of a pointer before the check for the pointer being
 226          NULL, reported by the Stanford checker.
 227        - Fixed several missing error checks, reported by the Stanford
 228          checker and fixed by Rasmus Andersen.
 229
 230NTFS 1.1.15 (changes since kernel 2.4.4's NTFS driver):
 231
 232        - New mount option show_sys_files=<bool> to show all system files as
 233          normal files.
 234        - Support for files and in general any attributes up to the full 2TiB
 235          size supported by the NTFS filesystem. Note we only support up to
 236          32-bits worth of inodes/clusters at this point.
 237        - Support for more than 128kiB sized runlists (using vmalloc_32()
 238          instead of kmalloc()).
 239        - Fixed races in allocation of clusters and mft records.
 240        - Fixed major bugs in attribute handling / searching / collation.
 241        - Fixed major bugs in compressing a run list into a mapping pairs array.
 242        - Fixed major bugs in inode allocation. Especially file create and
 243          mkdir.
 244        - Fixed memory leaks.
 245        - Fixed major bug in inode layout assignment of sequence numbers.
 246        - Lots of other bug fixes I can't think of right now...
 247        - Fixed NULL bug found by the Stanford checker in ntfs_dupuni2map().
 248        - Convert large stack variable to dynamically allocated one in
 249          ntfs_get_free_cluster_count() (found by Stanford checker).
 250
 251Kernel 2.4.4:
 252
 253        - Started ChangeLog.
 254
 255
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.