Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (5 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.h

    r606 r610  
    4545 * - The leaves are pointers on physical page descriptors, dynamically allocated
    4646 *   in the local cluster.
    47  * - In a given cluster, a mapper is a "private" structure: a thread accessing the mapper
    48  *   must be running in the cluster containing it (can be a local thread or a RPC thread).
    49  * - The mapper is protected by a blocking "rwlock", to support several simultaneous
    50  *   readers, and only one writer. This lock implement a busy waiting policy.
    51  * - The mapper_get_page() function that return a page descriptor pointer from a page
    52  *   index in file is in charge of handling the miss on the mapper cache.
     47 * - The mapper is protected by a "remote_rwlock", to support several simultaneous
     48 *   "readers", and only one "writer".
     49 * - A "reader" thread, calling the mapper_remote_get_page() function to get a page
     50 *   descriptor pointer from the page index in file, can be remote (running in any cluster).
     51 * - A "writer" thread, calling the mapper_handle_miss() function to handle a page miss
     52 *   must be local (running in the mapper cluster).
    5353 * - The vfs_mapper_move_page() function access the file system to handle a mapper miss,
    5454 *   or update a dirty page on device.
    55  * - The vfs_mapper_load_all() functions is used to load all pages of a given file
    56  *   or directory into the mapper.
     55 * - The vfs_mapper_load_all() functions is used to load all pages of a directory
     56 *   into the mapper (prefetch).
    5757 * - the mapper_move_user() function is used to move data to or from an user buffer.
    5858 *   This user space buffer can be physically distributed in several clusters.
     
    137137
    138138/*******************************************************************************************
    139  * This function move data between a local mapper, and a distributed user buffer.
    140  * It must be called by a thread running in cluster containing the mapper.
     139 * This function move data between a remote mapper, dentified by the <mapper_xp> argument,
     140 * and a distributed user buffer. It can be called by a thread running in any cluster.
    141141 * It is called by the vfs_user_move() to implement sys_read() and sys_write() syscalls.
    142142 * If required, the data transfer is split in "fragments", where one fragment contains
     
    144144 * It uses "hal_uspace" accesses to move a fragment to/from the user buffer.
    145145 * In case of write, the dirty bit is set for all pages written in the mapper.
    146  * The mapper being an extendable cache, it is automatically extended when required
    147  * for both read and write accesses.
     146 * The mapper being an extendable cache, it is automatically extended when required.
    148147 * The "offset" field in the file descriptor, and the "size" field in inode descriptor
    149148 * are not modified by this function.
    150149 *******************************************************************************************
    151  * @ mapper       : local pointer on mapper.
     150 * @ mapper_xp    : extended pointer on mapper.
    152151 * @ to_buffer    : mapper -> buffer if true / buffer -> mapper if false.
    153152 * @ file_offset  : first byte to move in file.
     
    156155 * returns O if success / returns -1 if error.
    157156 ******************************************************************************************/
    158 error_t mapper_move_user( mapper_t * mapper,
     157error_t mapper_move_user( xptr_t     mappe_xp,
    159158                          bool_t     to_buffer,
    160159                          uint32_t   file_offset,
Note: See TracChangeset for help on using the changeset viewer.