函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\swap.c Create Date:2022-07-27 11:02:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swap_read_page

函数原型:static int swap_read_page(struct swap_map_handle *handle, void *buf, struct hib_bio_batch *hb)

返回类型:int

参数:

类型参数名称
struct swap_map_handle *handle
void *buf
struct hib_bio_batch *hb
1014  如果非cur则返回:负EINVAL
1016  offset等于entries[k]
1017  如果非offset则返回:负EFAULT
1019  error等于hib_submit_io(REQ_OP_READ, 0, offset, buf, hb)
1020  如果error则返回:error
1022  如果k先自加大于等于The swap map is a data structure used for keeping track of each page* written to a swap partition
1023  k等于0
1024  free_page((unsignedlong)map)
1025  tmp等于maps
1026  maps等于next
1027  释放内存
1028  如果非mapsThe following functions allow us to read data using a swap map* in a file-alike way
1030  否则cur等于map
1033  返回:error
调用者
名称描述
load_imageload_image - load the image using the swap map handle*@handle and the snapshot handle @snapshot* (assume there are @nr_pages pages to load)
load_image_lzoload_image_lzo - Load compressed image data and decompress them with LZO.*@handle: Swap map handle to use for loading data.*@snapshot: Image to copy uncompressed data into.*@nr_to_read: Number of pages to load.
swsusp_readswsusp_read - read the hibernation image.*@flags_p: flags passed by the "frozen" kernel in the image header should* be written into this memory location