Changes between Version 15 and Version 16 of file_system
- Timestamp:
- Jul 6, 2015, 7:28:36 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
file_system
v15 v16 10 10 This implementation supports only block devices with block_size = 512 bytes. 11 11 12 The max file size is 4 Gbytes.13 12 The max size for a single file is 4 Gbytes. 13 14 14 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. 15 15 … … 31 31 To support various block device peripheral, this FAT32 implementation defines a generic function to transparently access various physical block devices, using the driver specified in the ''hard_config.h'' file. Five drivers are presently supported ( IOC_BDV / IOC_HBA / IOC_SDC / IOC_SPI / IOC_RDK ). 32 32 33 WARNING 1: A node name (file or directory) cannot be larger than 3 7characters.33 WARNING 1: A node name (file or directory) cannot be larger than 31 characters. 34 34 35 35 WARNING 2: There is no rescue mechanism (at the moment) in case of heap overflow: The system crash with a nice error message on the kernel terminal if the heap defined in the mapping is too small... … … 61 61 == 4) Access Functions == 62 62 63 === int '''_fat_init'''( unsigned int use_irq ) === 64 This function initializes the statically defined FAT structures: 65 * Fat-Descriptor. 66 * File-Descriptors-Array. 67 * Fat-Cache root. 68 * Inode-Tree root. 69 As is called by the boot-loader, and by the kernel_init, it does not use dynamic memory allocation. 70 The polling/descheduling mode is defined by the '''use_irq''' argument. 71 It use informations found in the boot sector and FS-INFO sector, that are loaded in the FAT 512 bytes buffer. 63 === int '''_fat_init'''( unsigned int kernel_mode ) === 64 This function initializes the FAT structures. It is called twice, by the boot-loader, and by the kernel_init. 65 * in '''boot mode''' (kernel_mode == 0), it initialises only the statically defined Fat-Descriptor, using informations found in the boot sector and FS-INFO sector, that are loaded in the FAT descriptor 512 bytes buffer. In this mode, it is used by the boot code to load the ''kernel.elf'' file, and the various ''application.elf'' files, 66 into memory by accessing directly to the block device. 67 * in '''kernel mode''' (kernel_mode != 0), it uses the distributed kernel heap to initialises the dynamically allocated structures such as the Inode-Tree, the Fat-Cache, and the File-Cache for the root directory. 68 72 69 It returns 0 if success / It returns -1 if failure. 73 70