Function report |
Source Code:block\blk-lib.c |
Create Date:2022-07-28 17:07:09 |
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_discard
Proto:int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, int flags, struct bio **biop)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct block_device * | bdev | |
sector_t | sector | |
sector_t | nr_sects | |
gfp_t | gfp_mask | |
int | flags | |
struct bio ** | biop |
29 | q = bdev_get_queue(bdev) |
37 | If bdev_read_only(bdev) Then Return -EPERM |
40 | If flags & ssue a secure erase Then |
41 | If Not blk_queue_secure_erase(q) Then Return -EOPNOTSUPP |
43 | op = REQ_OP_SECURE_ERASE |
44 | Else |
45 | If Not blk_queue_discard(q) Then Return -EOPNOTSUPP |
47 | op = REQ_OP_DISCARD |
50 | bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1 |
61 | WARN_ON_ONCE((req_sects << 9) > UINT_MAX) |
63 | bio = blk_next_bio(bio, 0, gfp_mask) |
65 | bio_set_dev(bio, bdev) |
68 | residual I/O count = req_sects << 9 |
78 | cond_resched() |
82 | Return 0 |
Name | Describe |
---|---|
blkdev_issue_discard | lkdev_issue_discard - queue a discard*@bdev: blockdev to issue discard for*@sector: start sector*@nr_sects: number of sectors to discard*@gfp_mask: memory allocation flags (for bio_alloc)*@flags: BLKDEV_DISCARD_* flags to control behaviour* Description: |
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 |