Changes between Version 54 and Version 55 of file_system


Ignore:
Timestamp:
Feb 4, 2016, 12:13:57 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v54 v55  
    189189This function returns in the <desc> argument a pointer on a buffer descriptor contained in a File_Cache, handling the possible miss.
    190190The searched file or directory is identified by the <inode> argument. The <cluster_id> argument is the buffer index in the File-Cache. The <writable> argument define the behaviour in case of miss in the File-Cache:
    191  * 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.
    192  * if [writable and all clusters (from 0 to cluster_id) are not allocated], it allocates in FAT the required cluster, it updates the size attribute (for a file), or the is_dir attribute (for a directory), and load the missing cluster in the File-Cache, marked as dirty.
    193  * if [not writable and all clusters (from 0 to cluster_id) are not allocated] it returns an error.
     191 * if [cluster_id 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.
     192 * if [writable and cluster_id not allocated in FAT], it allocates in FAT the required cluster, it updates the size attribute (for a file), or the is_dir attribute (for a directory), and load the missing cluster in the File-Cache, marked as dirty.
     193 * if [not writable and cluster_id not allocated in FAT] it returns an error.
    194194This function is called by various FAT functions to access a file or a directory, but is also called by the _sys_fat_mmap() function.
    195195It does not take the FAT lock, that must be taken by the caller.