Changes between Version 46 and Version 47 of file_system


Ignore:
Timestamp:
Feb 3, 2016, 12:56:46 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v46 v47  
    179179
    180180=== __int '''_get_file_cache_buffer'''( fat_node_t* indoor , unsigned int cluster_id , unsigned int writable , fat_cache_desc_t** desc )__ ===
    181 This function returns in the <desc> argument a pointer on a buffer descriptor contained in a File_Cache.
    182 The 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:
    183  * 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.
     181This function returns in the <desc> argument a pointer on a buffer descriptor contained in a File_Cache. It can be used for a file or for a directory.
     182The searched buffer is identified by the <inode> argument. The <cluster_id> argument is the buffer index in the file. The <writable> argument define the behaviour in case of miss in the File-Cache:
     183 * 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 is set.
    184184 * if [not writable and all clusters (from 0 to cluster_id) not allocated] it returns an error.
    185  * 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.
     185 * if [writable and all clusters (from 0 to cluster_id) not allocated], it allocates in FAT the required cluster, it updates the size in the inode and dentry (for a file), and load the missing cluster in the File-Cache, marked as dirty.
    186186This function is called by the _sys_fat_mmap() function, and by other FAT functions.
    187187It does not take the FAT lock, that must be taken by the caller.