函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-27 16:49:13
Last Modify:2020-03-17 22:19:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:A `swap extent' is a simple thing which maps a contiguous range of pages* onto a contiguous range of disk blocks. An ordered list of swap extents* is built at swapon time and is then used at swap_writepage/swap_readpage

函数原型:static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)

返回类型:int

参数:

类型参数名称
struct swap_info_struct *sis
sector_t *span
2383  swap_file等于seldom referenced
2384  mapping等于f_mapping
2385  inode等于host
2388  如果S_ISBLK(i_mode)则
2389  ret等于Add a block range (and the corresponding page range) into this swapdev's* extent tree.* This function rather assumes that it is called in ascending page order.
2390  span等于al of usable pages of swap
2391  返回:ret
2394  如果swap_activate
2395  ret等于swap_activate(sis, swap_file, span)
2396  如果ret大于等于0则SWP_USED etc: see above 或等于SWP_ACTIVATED
2398  如果非ret
2403  返回:ret
2406  返回:generic_swapfile_activate(sis, swap_file, span)
调用者
名称描述
setup_swap_map_and_extents