Ignore:
Timestamp:
Jan 11, 2019, 6:35:07 PM (3 years ago)
Author:
alain
Message:

Fix several bugs in vfs.c, fatfs.c, and devfs.c to support
the <.> and <..> directory entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/rpc.h

    r611 r612  
    4040struct pthread_attr_s;
    4141struct remote_sem_s;
     42struct user_dir_s;
    4243struct fragment_s;
    4344struct vfs_inode_s;
     
    6364    RPC_UNDEFINED_2               = 2,     
    6465    RPC_PROCESS_MAKE_FORK         = 3,
    65     RPC_UNDEFINED_4               = 4,
    66     RPC_UNDEFINED_5               = 5,
     66    RPC_USER_DIR_CREATE           = 4,
     67    RPC_USER_DIR_DESTROY          = 5,
    6768    RPC_THREAD_USER_CREATE        = 6,
    6869    RPC_THREAD_KERNEL_CREATE      = 7,
     
    7677    RPC_VFS_FILE_CREATE           = 14,
    7778    RPC_VFS_FILE_DESTROY          = 15,
    78     RPC_VFS_FS_CHILD_INIT         = 16,
     79    RPC_VFS_FS_GET_DENTRY         = 16,
    7980    RPC_VFS_FS_ADD_DENTRY         = 17,
    8081    RPC_VFS_FS_REMOVE_DENTRY      = 18,
     
    226227
    227228/***********************************************************************************
    228  * [4] undefined slot
    229  **********************************************************************************/
    230 
    231 /***********************************************************************************
    232  * [5] undefined slot
    233  **********************************************************************************/
     229 * [4] The RPC_USER_DIR_CREATE allows a client thread to create an user_dir_t
     230 * structure and the associated array of dirents in a remote cluster containing
     231 * the target directory inode. It is called by the sys_opendir() function.
     232 ***********************************************************************************
     233 * @ cxy        : server cluster identifier.
     234 * @ inode      : [in]   local pointer on inode in server cluster.
     235 * @ dir        : [out]  local pointer on created user_dir structure.
     236 **********************************************************************************/
     237void rpc_user_dir_create_client( cxy_t                 cxy,
     238                                 struct vfs_inode_s  * inode,
     239                                 struct user_dir_s  ** dir );
     240
     241void rpc_user_dir_create_server( xptr_t xp );
     242
     243/***********************************************************************************
     244 * [5] The RPC_USER_DIR_DESTROY allows a client thread to delete an user_dir_t
     245 * structure and the associated array of dirents in a remote cluster containing
     246 * the target directory inode. It is called by the sys_closedir() function.
     247 ***********************************************************************************
     248 * @ cxy        : server cluster identifier.
     249 * @ dir        : [in]  local pointer on created user_dir structure.
     250 **********************************************************************************/
     251void rpc_user_dir_destroy_client( cxy_t               cxy,
     252                                  struct user_dir_s * dir );
     253
     254void rpc_user_dir_destroy_server( xptr_t xp );
    234255
    235256/***********************************************************************************
     
    402423
    403424/***********************************************************************************
    404  * [16] The RPC_VFS_FS_CHILD_INIT calls the vfs_fs_child_init_load_inode()
     425 * [16] The RPC_VFS_FS_GET_DENTRY calls the vfs_fs_get_dentry()
    405426 * function in a remote cluster containing a parent inode directory to scan the
    406427 * associated mapper, find a directory entry identified by its name, and update
    407  * both the child inode and the dentry.
     428 * both the - existing - child inode and dentry.
    408429 ***********************************************************************************
    409430 * @ cxy            : server cluster identifier
     
    413434 * @ error          : [out] error status (0 if success).
    414435 **********************************************************************************/
    415 void rpc_vfs_fs_child_init_client( cxy_t                cxy,
     436void rpc_vfs_fs_get_dentry_client( cxy_t                cxy,
    416437                                   struct vfs_inode_s * parent_inode,
    417438                                   char               * name,
     
    419440                                   error_t            * error );
    420441
    421 void rpc_vfs_fs_child_init_server( xptr_t xp );
     442void rpc_vfs_fs_get_dentry_server( xptr_t xp );
    422443
    423444/***********************************************************************************
Note: See TracChangeset for help on using the changeset viewer.