函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

返回类型:int

参数:

类型参数名称
struct block_device *bdev
sector_tsector
sector_tnr_sects
gfp_tgfp_mask
unsignedflags
361  ret等于0
365  try_write_zeroes等于非非bdev_write_zeroes_sectors(bdev)
367  bs_mask等于bdev_logical_block_size(bdev)右移9位的值减1
368  如果sector按位或nr_sects的值按位与bs_mask则返回:负EINVAL
371  retry :
372  bio = NULL
373  lk_start_plug - initialize blk_plug and track it inside the task_struct*@plug: The &struct blk_plug that needs to be initialized* Description:* blk_start_plug() indicates to the block layer an intent by the caller
374  如果try_write_zeroes
375  ret等于__blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp_mask, & bio, flags)
377  否则如果非flags按位与don't write explicit zeroes 的值则
378  ret等于__blkdev_issue_zero_pages(bdev, sector, nr_sects, gfp_mask, & bio)
380  否则
382  ret等于负EOPNOTSUPP
384  如果ret恒等于0且bio
385  ret等于submit_bio_wait - submit a bio, and wait until it completes*@bio: The &struct bio which describes the I/O* Simple wrapper around submit_bio()
386  _put - release a reference to a bio*@bio: bio to release reference to* Description:* Put a reference to a &struct bio, either one you have gotten with* bio_alloc, bio_get or bio_clone_*. The last put of a bio will free it.
388  lk_finish_plug - mark the end of a batch of submitted I/O*@plug: The &struct blk_plug passed to blk_start_plug()* Description:* Indicate that a batch of I/O submissions is complete. This function* must be paired with an initial call to blk_start_plug()
389  如果rettry_write_zeroes
390  如果非flags按位与don't write explicit zeroes 的值则
391  try_write_zeroes = false
392  转到:retry
394  如果非bdev_write_zeroes_sectors(bdev)则
401  ret等于负EOPNOTSUPP
405  返回:ret
调用者
名称描述
blk_ioctl_zeroout
blkdev_fallocate
__dax_zero_page_range