函数逻辑报告

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

函数名称:There is no bio. Make one now.

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

返回类型:int

参数:

类型参数名称
struct dio *dio
struct dio_submit *sdio
sector_tstart_sector
struct buffer_head *map_bh
711  ret等于A really large O_DIRECT read or write can generate a lot of BIOs. So* to keep the memory consumption sane we periodically reap any completed BIOs* during the BIO generation phase.* This also helps to limit the peak amount of pinned userspace memory.
712  如果ret则转到:out
714  sector等于start_sector左移doesn't change 减9位
715  nr_pages等于两数取小(approximate total IO pages , BIO_MAX_PAGES)
716  BUG_ON(nr_pages <= 0)
717  dio_bio_alloc(dio, sdio, b_bdev, sector, nr_pages)
718  prev block is at a boundary 等于0
719  out :
720  返回:ret
调用者
名称描述
dio_send_cur_pagePut cur_page under IO