函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hib_submit_io

函数原型:static int hib_submit_io(int op, int op_flags, unsigned long page_off, void *addr, struct hib_bio_batch *hb)

返回类型:int

参数:

类型参数名称
intop
intop_flags
unsigned longpage_off
void *addr
struct hib_bio_batch *hb
266  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(addr)
268  error等于0
270  bio等于bio_alloc(GFP_NOIO | __GFP_HIGH, 1)
271  device address in 512 byte sectors 等于page_offPAGE_SIZE右移9位的值
272  bio_set_dev(bio, hib_resume_bdev)
273  bsolete, don't use in new code
275  如果bio_add_page(bio, page, PAGE_SIZE, 0)小于PAGE_SIZE
276  打印错误信息("Adding page to bio failed at %llu\n", (unsignedlonglong) device address in 512 byte sectors )
278  bio_put(bio)
279  返回:负EFAULT
282  如果hb
283  bi_end_io等于hib_end_io
284  bi_private等于hb
285  atomic_inc( & count)
286  submit_bio - submit a bio to the block device layer for I/O*@bio: The &struct bio which describes the I/O* submit_bio() is very similar in purpose to generic_make_request(), and* uses that function to do most of the work. Both are fairly rough
287  否则
288  error等于submit_bio_wait - submit a bio, and wait until it completes*@bio: The &struct bio which describes the I/O* Simple wrapper around submit_bio()
289  bio_put(bio)
292  返回:error
调用者
名称描述
mark_swapfilesSaving part
write_pagewrite_page - Write one page to given swap location.*@buf: Address we're writing.*@offset: Offset of the swap page we're writing to.*@hb: bio completion batch
get_swap_reader
swap_read_page
swsusp_checkswsusp_check - Check for swsusp signature in the resume device