函数逻辑报告 |
Source Code:block\blk-zoned.c |
Create Date:2022-07-27 19:41:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:lkdev_zone_mgmt - Execute a zone management operation on a range of zones*@bdev: Target block device*@op: Operation to be performed on the zones*@sector: Start sector of the first zone to operate on*@nr_sectors: Number of sectors, should be at least the
函数原型:int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, sector_t sector, sector_t nr_sectors, gfp_t gfp_mask)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct block_device * | bdev | |
enum req_opf | op | |
sector_t | sector | |
sector_t | nr_sectors | |
gfp_t | gfp_mask |
160 | q等于bdev_get_queue(bdev) |
162 | capacity等于get_capacity(bd_disk) |
163 | end_sector等于sector加nr_sectors |
167 | 如果非blk_queue_is_zoned(q)则返回:负EOPNOTSUPP |
170 | 如果bdev_read_only(bdev)则返回:负EPERM |
176 | 如果非nr_sectors或end_sector大于capacity则返回:负EINVAL |
181 | 如果sector按位与zone_sectors减1则返回:负EINVAL |
184 | 如果nr_sectors按位与zone_sectors减1且end_sector不等于capacity则返回:负EINVAL |
187 | 当sector小于end_sector循环 |
188 | bio等于blk_next_bio(bio, 0, gfp_mask) |
189 | bio_set_dev(bio, bdev) |
195 | 如果op恒等于REQ_OP_ZONE_RESET且blkdev_allow_reset_all_zones(bdev, sector, nr_sectors)则 |
203 | sector加等于zone_sectors |
206 | cond_resched() |
209 | 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() |
212 | 返回:ret |
名称 | 描述 |
---|---|
blkdev_zone_mgmt_ioctl | BLKRESETZONE, BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE ioctl processing.* Called from blkdev_ioctl. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |