函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\swapfile.c Create Date:2022-07-29 11:08:09
Last Modify:2020-03-18 11:03:10 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Collect physical extents for this swap file. Physical extents reported to* the swap code must be trimmed to align to a page boundary. The logical* offset within the file is irrelevant since the swapfile code maps logical

函数原型:static int iomap_swapfile_add_extent(struct iomap_swapfile_info *isi)

返回类型:int

参数:

类型参数名称
struct iomap_swapfile_info *isi
31  iomap等于accumulated iomap
42  first_ppage等于@a is a power of 2 value ( disk offset of mapping, bytes , PAGE_SIZE)右移PAGE_SHIFT determines the page size
43  next_ppage等于ALIGN_DOWN( disk offset of mapping, bytes + length of mapping, bytes , PAGE_SIZE)右移PAGE_SHIFT determines the page size
47  如果first_ppage大于等于next_ppage则返回:0
49  nr_pages等于next_ppagefirst_ppage
56  first_ppage_reported等于first_ppage
57  如果 file offset of mapping, bytes 恒等于0则first_ppage_reported自加
59  如果lowest physical addr seen (pages) 大于first_ppage_reportedlowest physical addr seen (pages) 等于first_ppage_reported
61  如果highest physical addr seen (pages) 小于next_ppage减1则highest physical addr seen (pages) 等于next_ppage减1
65  error等于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.
66  如果error小于0则返回:error
68  xtent count 加等于error
69  umber of pages collected 加等于nr_pages
70  返回:0
调用者
名称描述
iomap_swapfile_activate_actorAccumulate iomaps for this swap file. We have to accumulate iomaps because* swap only cares about contiguous page-aligned physical extents and makes no* distinction between written and unwritten extents.
iomap_swapfile_activateIterate a swap file's iomaps to construct physical extents that can be* passed to the swapfile subsystem.