Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-28 15:18:48
Last Modify:2020-03-17 22:19:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)

Type:int

Parameter:

TypeParameterName
struct swap_info_struct *sis
sector_t *span
2383  swap_file = seldom referenced
2384  mapping = f_mapping
2385  inode = host
2388  If S_ISBLK(i_mode) Then
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  Return ret
2394  If swap_activate Then
2395  ret = swap_activate(sis, swap_file, span)
2396  If ret >= 0 Then SWP_USED etc: see above |= SWP_ACTIVATED
2398  If Not ret Then
2403  Return ret
2406  Return generic_swapfile_activate(sis, swap_file, span)
Caller
NameDescribe
setup_swap_map_and_extents