函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:snapshot_read_next - Get the address to read the next image page from.*@handle: Snapshot handle to be used for the reading.* On the first call, @handle should point to a zeroed snapshot_handle* structure

函数原型:int snapshot_read_next(struct snapshot_handle *handle)

返回类型:int

参数:

类型参数名称
struct snapshot_handle *handle
2097  如果umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)大于Number of pages needed for saving the original pfns of the image pages Total number of image pages 则返回:0
2100  如果非Pointer to an auxiliary buffer (1 page)
2102  Pointer to an auxiliary buffer (1 page) 等于get_image_page - Allocate a page for a hibernation image
2103  如果非Pointer to an auxiliary buffer (1 page) 则返回:负ENOMEM
2106  如果非umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)
2109  error等于init_header((structswsusp_info * )Pointer to an auxiliary buffer (1 page) )
2110  如果error则返回:error
2112  address of the block to read from* or write to等于Pointer to an auxiliary buffer (1 page)
2113  memory_bm_position_reset( & Memory bitmap used for marking saveable pages (during hibernation) or* hibernation image pages (during restore))
2114  memory_bm_position_reset( & Memory bitmap used during hibernation for marking allocated page frames that* will contain copies of saveable pages. During restore it is initially used* for marking hibernation image pages, but then the set bits from it are)
2115  否则如果umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)小于等于Number of pages needed for saving the original pfns of the image pages
2116  clear_page(Pointer to an auxiliary buffer (1 page) )
2117  pack_pfns - Prepare PFNs for saving.*@bm: Memory bitmap.*@buf: Memory buffer to store the PFNs in.* PFNs corresponding to set bits in @bm are stored in the area of memory* pointed to by @buf (1 page at a time).
2118  否则
2121  page等于pfn_to_page(memory_bm_rtree_next_pfn - Find the next set bit in a memory bitmap.*@bm: Memory bitmap.* Starting from the last returned position this function searches for the next* set bit in @bm and returns the PFN represented by it. If no more bits are)
2122  如果PageHighMem(page)则
2130  kaddr等于kmap_atomic(page)
2134  否则
2138  umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)自加
2139  返回:PAGE_SIZE
调用者
名称描述
save_imagesave_image - save the suspend image data
save_image_lzosave_image_lzo - Save the suspend image data compressed with LZO.*@handle: Swap map handle to use for saving the image.*@snapshot: Image to read data from.*@nr_to_write: Number of pages to save.
swsusp_writeswsusp_write - Write entire image and metadata.*@flags: flags to pass to the "boot" kernel in the image header* It is important _NOT_ to umount filesystems at this point. We want* them synced (in case something goes wrong) but we DO not want to mark
snapshot_read