feat: add clear cache cmd to /proc/fs_cache

write "clear pathcahe" to clear pathcaches and vnodes
write "clear pagecache" to clear pagecaches
write "clear all" to clear both pathcaches and pagechaches
the cache in use will not be cleared

close: #I3XLPH

Signed-off-by: mucor <mucorwang@gmail.com>
This commit is contained in:
mucor
2021-06-24 11:34:58 +08:00
parent ca40c79761
commit 3d1cf683f3
5 changed files with 79 additions and 20 deletions

View File

@@ -208,6 +208,7 @@ typedef struct ProcessCB LosProcessCB;
VOID OsVmmFileRegionFree(struct file *filep, LosProcessCB *processCB);
#ifdef LOSCFG_DEBUG_VERSION
VOID ResetPageCacheHitInfo(int *try, int *hit);
struct file_map* GetFileMappingList(void);
#endif
#ifdef __cplusplus
#if __cplusplus