函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:snapshot_write_next - Get the address to store the next image page.*@handle: Snapshot handle structure to guide the writing.* On the first call, @handle should point to a zeroed snapshot_handle* structure

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

返回类型:int

参数:

类型参数名称
struct snapshot_handle *handle
2594  error等于0
2597  如果umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)大于1且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
2600  Set to one to notify the caller of* snapshot_write_next() that it may* need to call wait_on_bio_chain()等于1
2602  如果非umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)
2603  如果非Pointer to an auxiliary buffer (1 page) Pointer to an auxiliary buffer (1 page) 等于get_image_page - Allocate a page for a hibernation image
2607  如果非Pointer to an auxiliary buffer (1 page) 则返回:负ENOMEM
2610  address of the block to read from* or write to等于Pointer to an auxiliary buffer (1 page)
2611  否则如果umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)恒等于1则
2612  error等于load header - Check the image header and copy the data from it.
2613  如果error则返回:error
2616  List of "safe" pages (ie. pages that were not used by the image kernel* before hibernation) that may be used as temporary storage for image kernel* memory contents. = NULL
2618  error等于memory_bm_create - Allocate memory for a memory bitmap.
2619  如果error则返回:error
2623  error等于page_key_alloc(Total number of image pages )
2624  如果error则返回:error
2627  hibernate_restore_protection_begin()
2628  否则如果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 加1则
2629  error等于pack_orig_pfns - Set bits corresponding to given PFNs in a memory bitmap.*@bm: Memory bitmap.*@buf: Area of memory containing the PFNs.* For each element of the array pointed to by @buf (1 page at a time), set the* corresponding bit in @bm.
2630  如果error则返回:error
2635  如果error则返回:error
2643  如果是错误则返回:错误
2646  否则
2647  copy_last_highmem_page()
2649  page_key_write(address of the block to read from* or write to)
2650  hibernate_restore_protect_page(address of the block to read from* or write to)
2651  address of the block to read from* or write to等于get_buffer - Get the address to store the next image data page.* Get the address that snapshot_write_next() should return to its caller to* write to.
2652  如果是错误则返回:错误
2654  如果address of the block to read from* or write to不等于Pointer to an auxiliary buffer (1 page) Set to one to notify the caller of* snapshot_write_next() that it may* need to call wait_on_bio_chain()等于0
2657  umber of the block of PAGE_SIZE bytes the* next operation will refer to (ie. current)自加
2658  返回:PAGE_SIZE
调用者
名称描述
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
snapshot_write