函数逻辑报告

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

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

函数原型:static int get_more_blocks(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
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  如果ret恒等于0则
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_endblkfs_startblk加1
669  buffer state bitmap (see above) 等于0
670  size of mapping 等于fs_count左移i_blkbits
683  create等于op恒等于REQ_OP_WRITE
684  如果doesn't change 按位与DIO_SKIP_HOLES
686  如果i_sizefs_startblk小于等于i_size减1右移i_blkbits位则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  如果ret恒等于0且buffer_defer_completion(map_bh)则ret等于dio_set_defer_completion(dio)
699  返回:ret
调用者
名称描述
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