Fat Study Notes (5)-FAQ

Source: Internet
Author: User

1. A file in FAT32 occupies at least an integer cluster, and a cluster occupies the sector of the integer power of 2. The reason for using the cluster in FAT32 is: because if you want to write a large file and use the sector configuration method, the number of sector is large and allocated in scattered space, which is not easy to manage, because the cluster is a continuous sector, the access time can be accelerated.

How do I know the starting cluster occupied by a file/dir? A: According to the Dir entry structure

How do I know which ters are contained in a file/dir? A: According to the fat table

 

2. Why does the rootdir of fat12 and fat16 occupy region separately? The size of rootdir is specified by bpb_rootentcnt, while that of FAT32 is canceled. rootdir is directly placed at cluster2?
A: If you set the number of clusters occupied by Dir entry structire in rootdir at the beginning, the maximum number of directories or files in the root directory will be reached, because one dir entry struct occupies 32 bytes, the number of Dir entry struct that a cluster can occupy is fixed.

 

3. When a directory contains a large number of files, resulting in a cluster being insufficient, the system can assign a cluster to the directory and modify the fat table corresponding to the directory, therefore, the number of subdirectories is limited by the disk capacity.

 

4. The starting cluster of the root directory is fixed (which can be read from the bootsector, and the root dir cluster of FAT32 is usually 2). The dir_attr of the Dir entry in the root directory is attr_volume_id, in addition, the dir_fstcluslo value in its dir entry is 0, and the root directory's cluster (FAT32 is usually cluster2) records the Dir entry information of the files in the subdirectory or root directory, for example, if the root directory contains three files a B c and three directories D E F, there will be the first six dir entries in cluster2, record the Dir entry information of a B c d e f respectively. the actual content of the B c file will find the cluster that stores the real content of the file according to the Dir entry corresponding to a B c in cluster2, the dir entry information of the file will not be recorded again in the cluster that stores the real content of the file.

Fat Study Notes (5)-FAQ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.