Changeset 625 for trunk/kernel/fs/fatfs.h
- Timestamp:
- Apr 10, 2019, 10:09:39 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.h
r623 r625 35 35 // The FATFS File System implements a FAT32 read/write file system. 36 36 // 37 // The FATFS extensions to the generic VFS are the following:37 // The FATFS specific extensions to the generic VFS are the following: 38 38 // 39 39 // 1) The vfs_ctx_t "extend" field is a void* pointing on the fatfs_ctx_t structure. … … 190 190 uint32_t root_dir_cluster; /*! cluster index for root directory */ 191 191 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 */ 193 193 uint32_t free_clusters; /*! free clusters number */ 194 194 remote_queuelock_t free_lock; /*! exclusive access to hint & number */ … … 224 224 225 225 /***************************************************************************************** 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 ****************************************************************************************/ 230 void fatfs_ctx_display( fatfs_ctx_t * ctx ); 229 231 230 232 /***************************************************************************************** … … 312 314 ***************************************************************************************** 313 315 * It initializes a new inode/dentry couple in Inode Tree, attached to the directory 314 * identified by the <parent_inode> argument. The newdirectory entry is identified315 * 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. 317 319 * 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. 320 322 * It must be called by a thread running in the cluster containing the parent inode. 321 323 ***************************************************************************************** … … 333 335 ***************************************************************************************** 334 336 * 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. 337 339 * It scan the mapper to find the entry identified by the dentry "name" field. 338 340 * It set the "size" field in the in the directory mapper AND marks the page as DIRTY. … … 427 429 * in <searched_cluster> the FATFS cluster index of a free cluster. 428 430 * 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. 436 439 ***************************************************************************************** 437 440 * @ searched_cluster : [out] found FATFS cluster index. … … 461 464 * This function moves a page from/to the mapper to/from the FATFS file system on device. 462 465 * 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.464 466 * The pointer on the mapper and the page index in file are found in the page descriptor. 465 467 * It is used for both a regular file/directory mapper, and the FAT mapper.
Note: See TracChangeset
for help on using the changeset viewer.