Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\direct-io.c Create Date:2022-07-28 20:15:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Put cur_page under IO

Proto:static inline int dio_send_cur_page(struct dio *dio, struct dio_submit *sdio, struct buffer_head *map_bh)

Type:int

Parameter:

TypeParameterName
struct dio *dio
struct dio_submit *sdio
struct buffer_head *map_bh
765  ret = 0
767  If under assembly Then
768  cur_offset = Offset in file
769  bio_next_offset = current first logical block in bio + residual I/O count
786  If current final block in bio + 1 != Where it starts || cur_offset != bio_next_offset Then 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().
791  If ( under assembly == NULL) Then
792  ret = There is no bio. Make one now.
793  If ret Then Go to out
797  If 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 Then
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  If ret == 0 Then
802  BUG_ON(ret != 0)
805  out :
806  Return ret
Caller
NameDescribe
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