Changeset 629 for trunk/kernel/fs


Ignore:
Timestamp:
May 17, 2019, 9:27:04 AM (5 years ago)
Author:
alain
Message:

Remove the "giant" rwlock protecting the GPT, and
use the GPT_LOCKED attribute in each PTE to prevent
concurrent modifications of one GPT entry.
The version number has been incremented to 2.1.

Location:
trunk/kernel/fs
Files:
2 edited

Legend:

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

    r628 r629  
    181181 *
    182182 * 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.
     183 * <free_clusters>, <lock>, and the <fs_info_buffer> are shared variables,
     184 * that can be modified by any thread running in any cluster. The <fs_info_buffer>
     185 * contains a copy of the FS_INFO sector, and is only allocated in the FAT cluster
     186 * (cluster 0). It is used to synchronously update the free clusters info on IOC device.
    188187 *  => For all these variables, only the values stored in the FAT cluster must be used.
    189188 ****************************************************************************************/
     
    202201
    203202    /* 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   */
    206203    uint32_t            free_cluster_hint;     /*! cluster[hint+1] is the first free    */
    207204    uint32_t            free_clusters;         /*! free clusters number                 */
  • trunk/kernel/fs/vfs.c

    r628 r629  
    26082608#if (DEBUG_VFS_LOOKUP & 1)
    26092609if( DEBUG_VFS_LOOKUP < cycle )
    2610 printk("\n[%s] thread[%x,%x] created missing inode <%s> in cluster %x\n",
     2610printk("\n[%s] thread[%x,%x] created missing inode for <%s> in cluster %x\n",
    26112611__FUNCTION__, process->pid, this->trdid, name, child_cxy );
    26122612#endif
     
    26292629
    26302630                // when the missing dentry is not in the parent mapper,
    2631                 // it is a new dentry that must be registered in parent directory mapper
     2631                // a new dentry must be registered in parent directory mapper
    26322632                if ( error )
    26332633                {
     
    28142814
    28152815    // 1. allocate one free cluster in file system to child inode,
    2816     // and update the File Allocation Table in both the TAF mapper and IOC device.
     2816    // and update the File Allocation Table in both the FAT mapper and IOC device.
    28172817    // It depends on the child inode FS type.
    28182818    vfs_ctx_t * ctx = hal_remote_lpt( XPTR( child_cxy , &child_ptr->ctx ) );
Note: See TracChangeset for help on using the changeset viewer.