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:Call into the fs to map some more disk blocks. We record the current number* of available blocks at sdio->blocks_available. These are in units of the* fs blocksize, i_blocksize(inode).* The fs is allowed to map lots of blocks at once

Proto:static int get_more_blocks(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
654  i_blkbits = doesn't change + 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
661  ret = from get_user_pages()
662  If ret == 0 Then
663  BUG_ON(Current offset into the underlyingfile in dio_block units. >= doesn't change )
664  fs_startblk = Current offset into the underlyingfile in dio_block units. >> 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
665  fs_endblk = doesn't change - 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
667  fs_count = fs_endblk - fs_startblk + 1
669  buffer state bitmap (see above) = 0
670  size of mapping = fs_count << i_blkbits
683  create = op == REQ_OP_WRITE
686  If i_size && fs_startblk <= i_size - 1 >> i_blkbits Then create = 0
690  ret = ( * lock mapping function )(inode, fs_startblk, map_bh, create)
694  copy from map_bh.b_private = reserved for b_end_io
696  If ret == 0 && buffer_defer_completion(map_bh) Then ret = dio_set_defer_completion(dio)
699  Return ret
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