Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-lib.c Create Date:2022-07-28 17:07:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__blkdev_issue_zero_pages

Proto:static int __blkdev_issue_zero_pages(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, struct bio **biop)

Type:int

Parameter:

TypeParameterName
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  If Not q Then Return -ENXIO
280  If bdev_read_only(bdev) Then Return -EPERM
283  When nr_sects != 0 cycle
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  When nr_sects != 0 cycle
293  nr_sects -= bi_size >> 9
294  sector += bi_size >> 9
295  If bi_size < sz Then Break
298  cond_resched()
301  biop = bio
302  Return 0
Caller
NameDescribe
__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