Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\swap.c Create Date:2022-07-28 10:02:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hib_submit_io

Proto:static int hib_submit_io(int op, int op_flags, unsigned long page_off, void *addr, struct hib_bio_batch *hb)

Type:int

Parameter:

TypeParameterName
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_off * (PAGE_SIZE >> 9)
272  bio_set_dev(bio, hib_resume_bdev)
273  bsolete, don't use in new code
275  If bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE Then
276  pr_err("Adding page to bio failed at %llu\n", (unsignedlonglong) device address in 512 byte sectors )
278  bio_put(bio)
279  Return -EFAULT
282  If hb Then
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  Else
288  error = submit_bio_wait(bio)
289  bio_put(bio)
292  Return error
Caller
NameDescribe
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