feat: page cache backed by vnode instead of filep
1, change the owner of page to vnode 2, save the file path in vnode close: #I4AGBR Signed-off-by: Leon Chan <chenwei26@huawei.com> Change-Id: I04f93e344c7231d1731746456babc419a6139e52 Signed-off-by: Leon Chan <chenwei26@huawei.com>
This commit is contained in:
@@ -41,81 +41,6 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* vfs/fs_file_mapping.c ****************************************************/
|
||||
/****************************************************************************
|
||||
* Name: init_file_mapping
|
||||
*
|
||||
* Description:
|
||||
* Init the global management structure of path <-> page_mapping
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern UINT32 init_file_mapping(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: add_mapping
|
||||
*
|
||||
* Description:
|
||||
* Create a new path <-> page_mapping mapping and add to global list.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern void add_mapping(struct file *filep, const char *fullpath);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: find_mapping
|
||||
*
|
||||
* Description:
|
||||
* Find the page_mapping for path in global list.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern struct page_mapping *find_mapping(const char *path);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: remove_mapping
|
||||
*
|
||||
* Description:
|
||||
* Drop all the page-caches for the file, and then remove mapping between
|
||||
* the file and pagecache.
|
||||
* ex_filp NULL: do not exclude any file, just matching the fullpath;
|
||||
* ex_filp not NULL: exclude it, which means, ex_filp can be open.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern int remove_mapping(const char *fullpath);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rename_mapping
|
||||
*
|
||||
* Description:
|
||||
* Rename the mapping from global path <-> page_mapping list.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern void rename_mapping(const char *src, const char *dst);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: dec_mapping
|
||||
*
|
||||
* Description:
|
||||
* Decrease the refcnt of mapping.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern void dec_mapping_nolock(struct page_mapping *mapping);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: update_file_path
|
||||
*
|
||||
* Description:
|
||||
* Update the path in file descriptors when do renaming.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern int update_file_path(const char *old_path, const char *new_path);
|
||||
|
||||
/**
|
||||
* @ingroup fs
|
||||
* @brief Initializes the vfs filesystem
|
||||
|
||||
Reference in New Issue
Block a user