函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\direct-io.c Create Date:2022-07-29 10:46:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Put cur_page under IO

函数原型:static inline int dio_send_cur_page(struct dio *dio, struct dio_submit *sdio, struct buffer_head *map_bh)

返回类型:int

参数:

类型参数名称
struct dio *dio
struct dio_submit *sdio
struct buffer_head *map_bh
765  ret等于0
767  如果 under assembly
768  cur_offset等于Offset in file
769  bio_next_offset等于current first logical block in bio residual I/O count
786  如果current final block in bio + 1 不等于Where it starts cur_offset不等于bio_next_offsetIn the AIO read case we speculatively dirty the pages before starting IO.* During IO completion, any of these pages which happen to have been written* back will be redirtied by bio_check_pages_dirty().
791  如果( under assembly == NULL)则
792  ret等于There is no bio. Make one now.
793  如果ret则转到:out
797  如果Attempt to put the current chunk of 'cur_page' into the current BIO. If* that was successful then update final_block_in_bio and take a ref against* the just-added page.* Return zero on success. Non-zero means the caller needs to start a new BIO.不等于0则
798  In the AIO read case we speculatively dirty the pages before starting IO.* During IO completion, any of these pages which happen to have been written* back will be redirtied by bio_check_pages_dirty().
799  ret等于There is no bio. Make one now.
800  如果ret恒等于0则
802  BUG_ON(ret != 0)
805  out :
806  返回:ret
调用者
名称描述
submit_page_sectionAn autonomous function to put a chunk of a page under deferred IO.* The caller doesn't actually know (or care) whether this piece of page is in* a BIO, or is under IO or whatever. We just take care of all possible * situations here
do_blockdev_direct_IOThis is a library function for use by filesystem drivers