Changes between Version 10 and Version 11 of file_system


Ignore:
Timestamp:
Jun 7, 2015, 2:15:16 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v10 v11  
    1111The max file size is 4 Gbytes.
    1212 
    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.
     13From 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.
    1414
    15 This implementation supports only cluster size = 4 Kbytes (i.e. 8 blocks).
     15This implementation supports only cluster size = 4 Kbytes (i.e. 8 contiguous blocks on block device).
    1616
    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.
     17The 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).
    1818Each 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.
     19The 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.
    2020
    2121This implementation defines four data structures:
     
    149149
    150150=== 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 512 bytes buffer defined in the FAT descriptor.
     151This 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.
    152152 * '''pathname''' : file complete pathname
    153153 * '''buffer_vbase''' : memory buffer virtual address