函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__blkdev_issue_write_zeroes

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

返回类型:int

参数:

类型参数名称
struct block_device *bdev
sector_tsector
sector_tnr_sects
gfp_tgfp_mask
struct bio **biop
unsignedflags
216  bio等于biop
218  q等于bdev_get_queue(bdev)
220  如果非q则返回:负ENXIO
223  如果bdev_read_only(bdev)则返回:负EPERM
227  max_write_zeroes_sectors等于bdev_write_zeroes_sectors(bdev)
229  如果max_write_zeroes_sectors恒等于0则返回:负EOPNOTSUPP
232 nr_sects循环
233  bio等于blk_next_bio(bio, 0, gfp_mask)
234  device address in 512 byte sectors 等于sector
235  bio_set_dev(bio, bdev)
236  bottom bits req flags, * top bits REQ_OP. Use * accessors.等于REQ_OP_WRITE_ZEROES
237  如果flags按位与do not free blocks bottom bits req flags, * top bits REQ_OP. Use * accessors.或等于REQ_NOUNMAP
240  如果nr_sects大于max_write_zeroes_sectors
244  否则
245  residual I/O count 等于nr_sects左移9位
246  nr_sects等于0
248  cond_resched()
251  biop等于bio
252  返回: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