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


Ignore:
Timestamp:
Jan 15, 2019, 1:59:32 PM (3 years ago)
Author:
alain
Message:

1) introduce a dev_ioc_sync_write() function in IOC API,

to improve the DEVFS synchronous update.

2) fix a big bug in both the user_dir_create() and user_dir_destroy()

functions: add an extended pointer on the reference client process
in the function's arguments.

File:
1 edited

Legend:

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

    r612 r614  
    4141#include <ramfs.h>
    4242#include <devfs.h>
     43#include <dev_ioc.h>
    4344
    4445/****  Forward declarations  ***/
     
    408409 * It must called by a local thread. Use the RPC_DENTRY_CREATE if client thread is remote.
    409410 ******************************************************************************************
    410  * @ fs_type    : file system type.
    411  * @ name       : directory entry file/dir name.
     411 * @ fs_type    : [in]  file system type.
     412 * @ name       : [in]  directory entry file/dir name.
    412413 * @ dentry_xp  : [out] buffer for extended pointer on created dentry.
    413414 * @ return 0 if success / return ENOMEM or EINVAL if error.
     
    421422 * allocated to the dentry descriptor.
    422423 * It must be executed by a thread running in the cluster containing the dentry.
    423  * Use the rpc_vfs_dentry_destroy_client() function if required.
     424 * Use the RPC_DENTRY_DESTROY if required.
    424425 ******************************************************************************************
    425  * @ dentry  : local pointer on dentry descriptor.
     426 * @ dentry  : [in] local pointer on dentry descriptor.
    426427 *****************************************************************************************/
    427428void vfs_dentry_destroy( vfs_dentry_t *  dentry ); 
     
    875876
    876877/******************************************************************************************
     878 * This function makes the I/O operation to move one page identified by the <page_xp>
     879 * argument to/from the IOC device from/to the mapper, as defined by <cmd_type>.
     880 * Depending on the file system type, it calls the proper, FS specific function.
     881 * It is used in case of MISS on the mapper, or when a dirty page in the mapper must
     882 * be updated in the File System.
     883 * The mapper pointer is obtained from the page descriptor.
     884 * It can be executed by any thread running in any cluster.
     885 * This function does NOT take any lock.
     886 ******************************************************************************************
     887 * @ page_xp   : extended pointer on page descriptor (for mapper and page_id).
     888 * @ cmd_type  : IOC_READ / IOC_WRITE / IOC_SYNC_READ / IOC_SYNC_WRITE
     889 * @ returns 0 if success / return -1 if device access failure.
     890 *****************************************************************************************/
     891error_t vfs_fs_move_page( xptr_t      page_xp,
     892                          cmd_type_t  cmd_type );
     893
     894/******************************************************************************************
    877895 * This function updates the mapper associated to a directory inode identified by the
    878896 * <parent> argument, to add a new entry identified by the <dentry> argument.
     
    10321050error_t vfs_fs_release_inode( xptr_t  inode_xp );
    10331051
    1034 /******************************************************************************************
    1035  * This function makes the I/O operation to move one page identified by the <page_xp>
    1036  * argument to/from the IOC device from/to the mapper, as defined by <to_mapper>.
    1037  * Depending on the file system type, it calls the proper, FS specific function.
    1038  * It is used in case of MISS on the mapper, or when a dirty page in the mapper must
    1039  * be updated in the File System.
    1040  * The mapper pointer is obtained from the page descriptor.
    1041  * It can be executed by any thread running in any cluster.
    1042  * This function does NOT take any lock.
    1043  ******************************************************************************************
    1044  * @ page_xp   : extended pointer on the page descriptor.
    1045  * @ to_mapper : transfer direction.
    1046  * @ returns 0 if success / return -1 if device access failure.
    1047  *****************************************************************************************/
    1048 error_t vfs_fs_move_page( xptr_t  page_xp,
    1049                           bool_t  to_mapper );
    1050 
    10511052
    10521053#endif  /* _VFS_H_ */
Note: See TracChangeset for help on using the changeset viewer.