函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:write_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

函数原型:static int write_page(void *buf, sector_t offset, struct hib_bio_batch *hb)

返回类型:int

参数:

类型参数名称
void *buf
sector_toffset
struct hib_bio_batch *hb
373  如果非offset则返回:负ENOSPC
376  如果hb
377  src等于__get_free_page(GFP_NOIO | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success. | __GFP_NORETRY)
379  如果src
380  copy_page(src, buf)
381  否则
382  ret等于hib_wait_io(hb)
383  如果ret则返回:ret
388  如果src
389  copy_page(src, buf)
390  否则
391  WARN_ON_ONCE(1)
392  hb = NULL
393  src等于buf
396  否则
397  src等于buf
399  返回:hib_submit_io(REQ_OP_WRITE, REQ_SYNC, offset, src, hb)
调用者
名称描述
swap_write_page
flush_swap_writer