Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the file has been allocated more than one cluster, then the FAT table entry will contain the address of the second cluster (which is also the index number of the second cluster’s entry in the FAT table). The second cluster entry points to the third, and so forth. A FAT entry like this forms a linked list commonly called a cluster chain.

The figure below Figure - File Allocation Table and Directory Entry relationship illustrates the relationship between the directory entry and the FAT.

Panel
borderWidth0
titleFigure - File Allocation Table and Directory Entry relationship

Image Added


In the figure above, the directory entry for a file points to the 40th entry in the FAT table. The 40th entry points to the 41st, the 41st to the 46th; the 46th is not a pointer, as the entry contains a special end-of-cluster-chain marker. This means that the 41st cluster is the final cluster allocated to the file.

Other entries in the FAT area illustrated in illustrated the figure above are either not allocated to a file, or allocated to a file whose cluster chain is terminated by the 43rd entry.

...

NOTE: Updating the FAT table is time consuming, but updating it frequently is very important. If the FAT table gets out of sync with its files, files and directories can become corrupted, resulting in the loss of data (see section 12-6 “Optional Journaling System” Optional Journaling System).