Changes between Version 31 and Version 32 of file_system


Ignore:
Timestamp:
Jan 14, 2016, 1:06:37 PM (8 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v31 v32  
    254254 * GIET_FAT32_IO_ERROR
    255255
     256=== __int _get_file_cache_buffer( fat_node_t* indoor , unsigned int cluster_id , unsigned int writable , fat_cache_desc_t** desc )__ ===
     257This function returns in the <desc> argument a pointer on a buffer descriptor contained in a File_Cache.
     258The searched buffer is idenfified by the <inode> and <cluster_id> arguments. The <cluster_id> argument is the buffer index in the file. The <writable> argument define the behaviour in case of miss in File-Cache:
     259 * if [all clusters (from 0 to cluster_id) are already allocated in FAT] it scan the FAT to find the cluster index on device, and load the missing cluster in the File-Cache, marked as dirty if writable.
     260 * if [not writable and all clusters (from 0 to cluster_id) not allocated] it returns an error.
     261 * if [writable and all clusters (from 0 to cluster_id) not allocated], it allocates in FAT all required clusters, it updates the size in the inode and dentry, and we allocate a buffer descriptor for the missing cluster, marked as dirty.
     262This function is called by the _sys_fat_mmap() function, and by other FAT functions.
     263It does not take the FAT lock, that must be taken by the caller.
     264It returns GIET_FAT32_OK on success, and returns a negative value on error:
     265 * GIET_FAT32_NOT_INITIALIZED
     266 * GIET_FAT32_INVALID_ARG
     267 * GIET_FAT32_IO_ERROR
     268
    256269== 5) Internal functions ==
    257270