函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:50:04 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:setup_swap_map_and_extents
函数原型:static int setup_swap_map_and_extents(struct swap_info_struct *p, union swap_header *swap_header, unsigned char *swap_map, struct swap_cluster_info *cluster_info, unsigned long maxpages, sector_t *span)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct swap_info_struct * | p | |
union swap_header * | swap_header | |
unsigned char * | swap_map | |
struct swap_cluster_info * | cluster_info | |
unsigned long | maxpages | |
sector_t * | span |
3028 | nr_good_pages等于maxpages减1 |
3030 | cluster_list_init( & clusters list ) |
3031 | cluster_list_init( & discard clusters list ) |
3033 | 以i小于nr_badpages循环 |
3052 | 如果nr_good_pages则 |
3059 | xtent of the swap_map 等于maxpages |
3062 | 如果nr_extents小于0则返回:nr_extents |
3066 | 如果非nr_good_pages则 |
3071 | 如果非cluster_info则返回:nr_extents |
3079 | 以k小于SWAP_CLUSTER_COLS循环 |
3080 | j等于k加col的和取模SWAP_CLUSTER_COLS |
3081 | 以i小于DIV_ROUND_UP(nr_clusters, SWAP_CLUSTER_COLS)循环 |
3082 | idx等于i乘SWAP_CLUSTER_COLS加j |
3083 | 如果idx大于等于nr_clusters则继续下一循环 |
3085 | 如果cluster_count( & cluster_info[idx])则继续下一循环 |
3087 | cluster_set_flag( & cluster_info[idx], This cluster is free ) |
3088 | cluster_list_add_tail( & clusters list , cluster_info, idx) |
3092 | 返回:nr_extents |
名称 | 描述 |
---|---|
SYSCALL_DEFINE2 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |