函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\super.c Create Date:2022-07-29 10:32:20
Last Modify:2022-05-24 06:42:17 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:One thing we have to be careful of with a per-sb shrinker is that we don't* drop the last active reference to the superblock from within the shrinker.* If that happens we could trigger unregistering the shrinker from within the

函数原型:static unsigned long super_cache_scan(struct shrinker *shrink, struct shrink_control *sc)

返回类型:unsigned long

参数:

类型参数名称
struct shrinker *shrink
struct shrink_control *sc
65  fs_objects等于0
67  freed等于0
71  sb等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(shrink, structsuper_block, s_shrink)
77  如果非gfp_mask按位与__GFP_FS的值则返回:SHRINK_STOP
80  如果非rylock_super - try to grab ->s_umount shared*@sb: reference we are trying to grab* Try to prevent fs shutdown. This is used in places where we* cannot take an active reference but we need to ensure that the则返回:SHRINK_STOP
83  如果nr_cached_objectsfs_objects等于nr_cached_objects(sb, sc)
86  inodes等于list_lru_shrink_count( & s_inode_lru, sc)
87  dentries等于list_lru_shrink_count( & s_dentry_lru, sc)
88  total_objects等于dentriesinodesfs_objects加1
89  如果非total_objectstotal_objects等于1
93  dentries等于Multiplies an integer by a fraction, while avoiding unnecessary* overflow or loss of precision.(nr_to_scan, dentries, total_objects)
94  inodes等于Multiplies an integer by a fraction, while avoiding unnecessary* overflow or loss of precision.(nr_to_scan, inodes, total_objects)
95  fs_objects等于Multiplies an integer by a fraction, while avoiding unnecessary* overflow or loss of precision.(nr_to_scan, fs_objects, total_objects)
104  nr_to_scan等于dentries加1
105  freed等于prune_dcache_sb(sb, sc)
106  nr_to_scan等于inodes加1
107  freed加等于de.c
109  如果fs_objects
110  nr_to_scan等于fs_objects加1
111  freed加等于free_cached_objects(sb, sc)
114  lease a read lock
115  返回:freed