Changeset 626 for trunk/kernel/fs/vfs.h


Ignore:
Timestamp:
Apr 29, 2019, 7:25:09 PM (5 years ago)
Author:
alain
Message:

This version has been tested on the sort multithreaded application
for TSAR_IOB architectures ranging from 1 to 8 clusters.
It fixes three bigs bugs:
1) the dev_ioc device API has been modified: the dev_ioc_sync_read()
and dev_ioc_sync_write() function use now extended pointers on the
kernel buffer to access a mapper stored in any cluster.
2) the hal_uspace API has been modified: the hal_copy_to_uspace()
and hal_copy_from_uspace() functions use now a (cxy,ptr) couple
to identify the target buffer (equivalent to an extended pointer.
3) an implementation bug has been fixed in the assembly code contained
in the hal_copy_to_uspace() and hal_copy_from_uspace() functions.

File:
1 edited

Legend:

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

    r625 r626  
    376376 * argument to a local buffer identified by the <name> argument.
    377377 * The local buffer size must be at least CONFIG_VFS_MAX_NAME_LENGTH.
    378  *****************************************************************************************
     378 ******************************************************************************************
    379379 * @ inode_xp  : extended pointer on the remote inode.
    380380 * @ name      : local buffer pointer.
     
    396396error_t vfs_inode_load_all_pages( vfs_inode_t * inode );
    397397
    398 
     398/******************************************************************************************
     399 * This debug function display the curren state of an inode descriptor identified by
     400 * the <inode_xp> argument.
     401 *****************************************************************************************/
     402void vfs_inode_display( xptr_t inode_xp );
    399403
    400404/******************************************************************************************
     
    547551 * It can be executed by any thread running in any cluster (can be different from both
    548552 * the child cluster and the parent cluster).
    549  *
    550  * [Implementation]
     553 * The new child inode and the parent inode can have different FS types.
     554 * [Implementation note]
    551555 * As there are cross-references between inode and dentry, this function implements
    552  * a three steps scenario :
     556 * a five steps scenario :
    553557 * 1) The dentry descriptor is created in the cluster containing the existing <parent_xp>
    554558 *    inode, and partially initialized, using the RPC_VFS_CREATE DENTRY if required.
    555559 * 2) The inode and its associated mapper are created in cluster identified by <child_cxy>,
    556560 *    and partially initialised, using the RPC_VFS_CREATE_INODE if required.
    557  *    The new inode and the parent inode can have different FS types.
    558  * 3) The pointers between the parent inode, the new dentry, and the child inode
    559  *    are updated, using remote accesses.
    560  ******************************************************************************************
     561 * 3) The pointers on dentry in parent inode are updated, using remote access.
     562 * 4) The pointers on dentry in child inode are updated, using remotes access.
     563 * 5) The pointers on parent and child inode in dentry are updated, using remotes access.
     564 *****************************************************************************************
    561565 * @ child_inode_cxy  : [in]  target cluster for child inode.
    562566 * @ fs_type          : [in]  child inode FS type.
     
    591595
    592596/******************************************************************************************
    593  * This function is called by the vfs_lookup() function when a new dentry/inode must
    594  * be created from scratch and introduced in both the Inode Tree and the IOC device.
    595  * The dentry and inode descriptors have been created by the caller.
    596  * - It allocates one cluster from the relevant FS, and updates the File Allocation
    597  *   Table (both the FAT mapper, and the IOC device).
    598  * - It set the "size", and "extend" fields in child inode descriptor.
    599  * - It updates the parent directory to introduce the new child in the parent directory
    600  *   inode descriptor (radix tree), in theparent inode mapper, and on IOC device.
    601  * - It set the "extend" field in dentry descriptor.
     597 * This function is called by the vfs_lookup() function when a new (dentry/inode) must
     598 * be created from scratch and introduced in both the parent mapper and the IOC device.
     599 * The dentry and inode descriptors must have been previously created by the caller.
     600 * 1. It allocates one cluster from the relevant FS, updates the FAT mapper,
     601 *    and synchronously update the IOC device).
     602 * 2. It set the "size", and "extend" fields in child inode descriptor.
     603 * 3. It updates the parent directory mapper to introduce the new child,
     604 *    and synchronously update the IOC device.
     605 * 4. It set the "extend" field in dentry descriptor.
    602606 * It can be called by a thread running in any cluster.
    603607 ******************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.