函数逻辑报告 |
Source Code:block\ioctl.c |
Create Date:2022-07-27 18:51:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:blkpg_ioctl
函数原型:static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct block_device * | bdev | |
struct blkpg_ioctl_arg __user * | arg |
27 | 如果copy_from_user( & a, arg, sizeof(structblkpg_ioctl_arg))则返回:负EFAULT |
29 | 如果copy_from_user( & p, data, sizeof(structblkpg_partition))则返回:负EFAULT |
32 | 如果bdev不等于bd_contains则返回:负EINVAL |
39 | start等于starting offset in bytes 右移9位 |
40 | length等于length in bytes 右移9位 |
50 | 如果starting offset in bytes 按位与bdev_logical_block_size(bdev)减1则返回:负EINVAL |
53 | mutex_lock( & open/close mutex ) |
56 | disk_part_iter_init( & piter, disk, clude 0-sized parts ) |
58 | 当part等于disk_part_iter_next( & piter)循环 |
66 | disk_part_iter_exit( & piter) |
69 | part等于add_partition(disk, partno, start, length, ADDPART_FLAG_NONE, NULL) |
72 | 返回:PTR_ERR_OR_ZERO(part) |
73 | 当:op恒等于BLKPG_DEL_PARTITION |
74 | part等于disk_get_part(disk, partno) |
79 | disk_put_part(part) |
83 | mutex_lock( & open/close mutex ) |
84 | 如果bd_openers则 |
87 | 返回:负EBUSY |
90 | fsync_bdev(bdevp) |
91 | invalidate_bdev(bdevp) |
93 | mutex_lock_nested( & open/close mutex , 1) |
94 | delete_partition(disk, partno) |
99 | 返回:0 |
100 | 当:op恒等于BLKPG_RESIZE_PARTITION |
101 | start等于starting offset in bytes 右移9位 |
103 | length等于length in bytes 右移9位 |
112 | part等于disk_get_part(disk, partno) |
116 | 如果非bdevp则 |
117 | disk_put_part(part) |
118 | 返回:负ENOMEM |
120 | mutex_lock( & open/close mutex ) |
121 | mutex_lock_nested( & open/close mutex , 1) |
122 | 如果start不等于start_sect则 |
126 | disk_put_part(part) |
127 | 返回:负EINVAL |
130 | disk_part_iter_init( & piter, disk, clude 0-sized parts ) |
132 | 当lpart等于disk_part_iter_next( & piter)循环 |
145 | disk_part_iter_exit( & piter) |
151 | disk_put_part(part) |
152 | 返回:0 |
153 | 默认 |
154 | 返回:负EINVAL |
名称 | 描述 |
---|---|
blkdev_ioctl | always keep this in sync with compat_blkdev_ioctl() |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |