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:If we are not writing the entire block and get_block() allocated* the block for us, we need to fill-in the unused portion of the* block with zeros

Proto:static inline void dio_zero_block(struct dio *dio, struct dio_submit *sdio, int end, struct buffer_head *map_bh)

Type:void

Parameter:

TypeParameterName
struct dio *dio
struct dio_submit *sdio
intend
struct buffer_head *map_bh
900  lag: sub-blocksize zeroing hasbeen performed at the start of awrite = 1
901  If Not When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change || Not buffer_new(map_bh) Then Return
904  dio_blocks_per_fs_block = 1 << When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change
905  this_chunk_blocks = Current offset into the underlyingfile in dio_block units. & dio_blocks_per_fs_block - 1
907  If Not this_chunk_blocks Then Return
914  If end Then this_chunk_blocks = dio_blocks_per_fs_block - this_chunk_blocks
917  this_chunk_bytes = this_chunk_blocks << doesn't change
919  page = ZERO_PAGE(0)
920  If An 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 Then Return
924  xt block to be put under IO,in dio_blocks units += this_chunk_blocks
Caller
NameDescribe
do_direct_IOWalk the user pages, and the file, mapping blocks to disk and generating* a sequence of (page,offset,len,block) mappings. These mappings are injected* into submit_page_section(), which takes care of the next stage of submission
do_blockdev_direct_IOThis is a library function for use by filesystem drivers