Changes between Version 15 and Version 16 of file_system


Ignore:
Timestamp:
Jul 6, 2015, 7:28:36 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v15 v16  
    1010This implementation supports only block devices with block_size = 512 bytes.
    1111
    12 The max file size is 4 Gbytes.
    13  
     12The max size for a single file is 4 Gbytes.
     13
    1414From 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.
    1515
     
    3131To 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 ).
    3232
    33 WARNING 1: A node name (file or directory) cannot be larger than 37 characters.
     33WARNING 1: A node name (file or directory) cannot be larger than 31 characters.
    3434
    3535WARNING 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...
     
    6161== 4) Access Functions ==
    6262
    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 ) ===
     64This 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,
     66into 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
    7269It returns 0 if success /  It returns -1 if failure.
    7370