Changes between Version 10 and Version 11 of file_system
- Timestamp:
- Jun 7, 2015, 2:15:16 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
file_system
v10 v11 11 11 The max file size is 4 Gbytes. 12 12 13 In the context of the FAT32, a cluster is the smallest storage allocation unit on the block device : any file (or directory) occupies at least one cluster, and a given cluster cannot be shared by 2 different files.13 From the software point of view, a cluster is the smallest storage allocation unit on the block device : any file (or directory) occupies at least one cluster, and a given cluster cannot be shared by 2 different files. 14 14 15 This implementation supports only cluster size = 4 Kbytes (i.e. 8 blocks).15 This implementation supports only cluster size = 4 Kbytes (i.e. 8 contiguous blocks on block device). 16 16 17 The FAT region on the block device is an array of 32 bits words defining the linked list of clusters allocated to given file in the DATA region of the block device , that is accessed as an array of 4Kbytes buffers.17 The FAT region on the block device is an array of 32 bits words defining the linked list of clusters allocated to given file in the DATA region of the block device. The DATA region is actually an array of 4 Kbytes buffers (i.e. an array of clusters). 18 18 Each slot in the FAT array contains a cluster index, that is the index of the next allocated cluster for a given file. 19 The cluster index in the FAT array is also the cluster index in the DATA region array. The cluster value cannot be larger than 0x0FFFFFFF (i.e. 256 M). The max addressable storage capacity in the DATA region on the block device is therefore (256 M * 4 Kbytes) = 1 Tbytes.19 The cluster index in the FAT array is also the cluster index in the DATA region array. The cluster index value cannot be larger than 0x0FFFFFFF (i.e. 256 M). The max addressable storage capacity in the DATA region on the block device is therefore (256 M * 4 Kbytes) = 1 Tbytes. We use the variable ''cluster'' to name the cluster index. 20 20 21 21 This implementation defines four data structures: … … 149 149 150 150 === int '''_fat_read_no_cache( char* pathname , unsigned int buffer_vbase , unsigned int buffer_size ) === 151 This functiond load a file identified by the pathname argument into the memory buffer defined by the buffer_vbase / buffer_size arguments. It is intended to be called by the boot-loader, as it uses neither the dynamically allocated FAT structures (Inode-Tree, Fat_Cache or File-Cache), nor the File-Descriptor-Array. It uses only the 512bytes buffer defined in the FAT descriptor.151 This functiond load a file identified by the pathname argument into the memory buffer defined by the buffer_vbase / buffer_size arguments. It is intended to be called by the boot-loader, as it uses neither the dynamically allocated FAT structures (Inode-Tree, Fat_Cache or File-Cache), nor the File-Descriptor-Array. It uses only the 4096 bytes buffer defined in the FAT descriptor. 152 152 * '''pathname''' : file complete pathname 153 153 * '''buffer_vbase''' : memory buffer virtual address