Ignore:
Timestamp:
May 6, 2019, 1:28:01 PM (5 years ago)
Author:
alain
Message:

Introduce teh page_min / page_max mechanism in the fatfs_release_inode()
function, to avoid to scan all pages in FAT mapper.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/fatfs.h

    r627 r628  
    180180 *   functions to modify the FAT in both the FAT mapper and on IOC device.
    181181 *
    182  * WARNING é : Almost all fields are constant values, but the <free_cluster_hint>,
    183  * <free_clusters> and <lock> are shared variables. The <fs_info_buffer>, only
    184  * allocated in cluster 0, contains a copy of the FS_INFO sector. It is used by all
    185  * kernel instances to synchronously update the free clusters info on IOC device.
    186  * For these four variables, all kernel instances must use the values in cluster 0,
    187  * containing the FAT mapper.
     182 * WARNING 2 : Most fields are constant values, but the <free_cluster_hint>,
     183 * <free_clusters>, <dirty_page_min>, <dirty_page_max>, <lock>, and the <fs_info_buffer>
     184 * are shared variables, that can be modified by any thread running in any cluster.
     185 * The <fs_info_buffer> contains a copy of the FS_INFO sector, and is only allocated in
     186 * the FAT cluster (i.e. in cluster 0). It is used by all to synchronously update the
     187 * free clusters info on IOC device.
     188 *  => For all these variables, only the values stored in the FAT cluster must be used.
    188189 ****************************************************************************************/
    189190
     
    201202
    202203    /* shared variables (only the copy in FAT cluster must be used)                     */
     204    uint32_t            dirty_page_min;        /*! min dirty page index in FAT mapper   */
     205    uint32_t            dirty_page_max;        /*! max dirty page index in FAT mapper   */
    203206    uint32_t            free_cluster_hint;     /*! cluster[hint+1] is the first free    */
    204207    uint32_t            free_clusters;         /*! free clusters number                 */
Note: See TracChangeset for help on using the changeset viewer.