Ignore:
Timestamp:
Apr 10, 2019, 10:09:39 AM (2 years ago)
Author:
alain
Message:

Fix a bug in the vmm_remove_vseg() function: the physical pages
associated to an user DATA vseg were released to the kernel when
the target process descriptor was in the reference cluster.
This physical pages release should be done only when the page
forks counter value is zero.
All other modifications are cosmetic.

File:
1 edited

Legend:

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

    r623 r625  
    3535// The FATFS File System implements a FAT32 read/write file system.
    3636//
    37 // The FATFS extensions to the generic VFS are the following:
     37// The FATFS specific extensions to the generic VFS are the following:
    3838//
    3939// 1) The vfs_ctx_t "extend" field is a void* pointing on the fatfs_ctx_t structure.
     
    190190    uint32_t            root_dir_cluster;      /*! cluster index for  root directory    */
    191191    xptr_t              fat_mapper_xp;         /*! extended pointer on FAT mapper       */
    192     uint32_t            free_cluster_hint;     /*! start point to search free cluster   */
     192    uint32_t            free_cluster_hint;     /*! cluster[hint+1] is the first free    */
    193193    uint32_t            free_clusters;         /*! free clusters number                 */
    194194    remote_queuelock_t  free_lock;             /*! exclusive access to hint & number    */
     
    224224
    225225/*****************************************************************************************
    226  * This function display the content of the FATFS context.
    227  ****************************************************************************************/
    228 void fatfs_ctx_display( void );
     226 * This function display the content of the local FATFS context.
     227 *****************************************************************************************
     228 * @ ctx  : local pointer on the context.
     229 ****************************************************************************************/
     230void fatfs_ctx_display( fatfs_ctx_t * ctx );
    229231
    230232/*****************************************************************************************
     
    312314 *****************************************************************************************
    313315 * It initializes a new inode/dentry couple in Inode Tree, attached to the directory
    314  * identified by the <parent_inode> argument. The new directory entry is identified
    315  * by the <name> argument. The child inode descriptor identified by the <child_inode_xp>
    316  * argument, and the dentry descriptor must have been previously allocated.
     316 * identified by the <parent_inode> argument. The directory entry is identified
     317 * by the <name> argument. The child inode descriptor, identified by the <child_inode_xp>
     318 * argument, and the associated dentry descriptor must have been previously allocated.
    317319 * It scan the parent mapper to find the <name> argument.
    318  * It set the "type", "size", and "extend" fields in inode descriptor.
    319  * It set the " extend" field in dentry descriptor.
     320 * It set the "type", "size", and "extend" fields in the child inode descriptor.
     321 * It set the " extend" field in the dentry descriptor.
    320322 * It must be called by a thread running in the cluster containing the parent inode.
    321323 *****************************************************************************************
     
    333335 *****************************************************************************************
    334336 * It update the size of a directory entry identified by the <dentry> argument in
    335  * the mapper of a directory identified by the <inode> argument, as defined by the <size>
    336  * argument.
     337 * the mapper of a directory identified by the <inode> argument, as defined by the
     338 * <size> argument.
    337339 * It scan the mapper to find the entry identified by the dentry "name" field.
    338340 * It set the "size" field in the in the directory mapper AND marks the page as DIRTY.
     
    427429 * in <searched_cluster> the FATFS cluster index of a free cluster.
    428430 * It can be called by a thread running in any cluster, as it uses remote access
    429  * primitives when the FAT mapper is remote. It takes the "free_lock" stored in the
    430  * FATFS context located in the same cluster as the FAT mapper itself, to get exclusive
    431  * access to the FAT. It uses (and updates) the <free_cluster_hint> and <free_clusters>
    432  * shared variables in this FATFS context.
    433  * It updates the FAT mapper, and synchronously updates the FAT region on IOC device.
    434  * The FAT mapper being a cache, this function updates the FAT mapper from informations
    435  * stored on IOC device in case of miss.
     431 * primitives when the FAT mapper is remote. It takes the queuelock stored in the FATFS
     432 * context (located in the same cluster as the FAT mapper itself), to get exclusive
     433 * access to the FAT. It uses the <free_cluster_hint> and <free_clusters> variables
     434 * stored in this FATFS context.
     435 * - it updates the <free_cluster_hint> and <free_clusters> variables in FATFS context.
     436 * - it updates the FAT mapper (handling miss from IOC device if required).
     437 * - it synchronously updates the FAT region on IOC device.
     438 * - it returns the allocated cluster index.
    436439 *****************************************************************************************
    437440 * @ searched_cluster    : [out] found FATFS cluster index.
     
    461464 * This function moves a page from/to the mapper to/from the FATFS file system on device.
    462465 * The page must have been previously allocated and registered in the mapper.   
    463  * The page - and the mapper - can be located in another cluster than the calling thread.
    464466 * The pointer on the mapper and the page index in file are found in the page descriptor.
    465467 * It is used for both a regular file/directory mapper, and the FAT mapper.
Note: See TracChangeset for help on using the changeset viewer.