函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-lib.c Create Date:2022-07-27 18:42:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__blkdev_issue_zero_pages

函数原型:static int __blkdev_issue_zero_pages(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, struct bio **biop)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
sector_tsector
sector_tnr_sects
gfp_tgfp_mask
struct bio **biop
272  q等于bdev_get_queue(bdev)
273  bio等于biop
274  bi_size等于0
277  如果非q则返回:负ENXIO
280  如果bdev_read_only(bdev)则返回:负EPERM
283 nr_sects不等于0循环
284  bio等于blk_next_bio(bio, Convert a number of 512B sectors to a number of pages.* The result is limited to a number of pages that can fit into a BIO.* Also make sure that the result is always at least 1 (page) for the cases, gfp_mask)
286  device address in 512 byte sectors 等于sector
287  bio_set_dev(bio, bdev)
288  bsolete, don't use in new code
290 nr_sects不等于0循环
293  nr_sects减等于bi_size右移9位
294  sector加等于bi_size右移9位
295  如果bi_size小于sz退出
298  cond_resched()
301  biop等于bio
302  返回:0
调用者
名称描述
__blkdev_issue_zeroout__blkdev_issue_zeroout - generate number of zero filed write bios*@bdev: blockdev to issue*@sector: start sector*@nr_sects: number of sectors to write*@gfp_mask: memory allocation flags (for bio_alloc)*@biop: pointer to anchor bio*@flags: controls
blkdev_issue_zerooutlkdev_issue_zeroout - zero-fill a block range*@bdev: blockdev to write*@sector: start sector*@nr_sects: number of sectors to write*@gfp_mask: memory allocation flags (for bio_alloc)*@flags: controls detailed behavior* Description:* Zero-fill a block