Function report |
Source Code:block\blk-lib.c |
Create Date:2022-07-28 17:07:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__blkdev_issue_write_zeroes
Proto: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)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct block_device * | bdev | |
sector_t | sector | |
sector_t | nr_sects | |
gfp_t | gfp_mask | |
struct bio ** | biop | |
unsigned | flags |
218 | q = bdev_get_queue(bdev) |
223 | If bdev_read_only(bdev) Then Return -EPERM |
229 | If max_write_zeroes_sectors == 0 Then Return -EOPNOTSUPP |
233 | bio = blk_next_bio(bio, 0, gfp_mask) |
235 | bio_set_dev(bio, bdev) |
237 | If flags & do not free blocks Then bottom bits req flags, * top bits REQ_OP. Use * accessors. |= REQ_NOUNMAP |
240 | If nr_sects > max_write_zeroes_sectors Then |
241 | residual I/O count = max_write_zeroes_sectors << 9 |
242 | nr_sects -= max_write_zeroes_sectors |
243 | sector += max_write_zeroes_sectors |
244 | Else |
245 | residual I/O count = nr_sects << 9 |
246 | nr_sects = 0 |
248 | cond_resched() |
252 | Return 0 |
Name | Describe |
---|---|
__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_zeroout | 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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |