函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-zoned.c Create Date:2022-07-27 19:41:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:BLKRESETZONE, BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE ioctl processing.* Called from blkdev_ioctl.

函数原型:int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
fmode_tmode
unsigned intcmd
unsigned longarg
281  __userargp等于arg
286  如果非argp则返回:负EINVAL
289  q等于bdev_get_queue(bdev)
290  如果非q则返回:负ENXIO
293  如果非blk_queue_is_zoned(q)则返回:负ENOTTY
296  如果非操作权限检查则返回:负EACCES
299  如果非mode按位与le is open for writing 的值则返回:负EBADF
302  如果copy_from_user( & zrange, argp, sizeof(structblk_zone_range))则返回:负EFAULT
306  :cmd恒等于BLKRESETZONE
307  op等于REQ_OP_ZONE_RESET
308  退出
309  :cmd恒等于BLKOPENZONE
310  op等于REQ_OP_ZONE_OPEN
311  退出
312  :cmd恒等于BLKCLOSEZONE
313  op等于REQ_OP_ZONE_CLOSE
314  退出
315  :cmd恒等于BLKFINISHZONE
316  op等于REQ_OP_ZONE_FINISH
317  退出
318  默认
319  返回:负ENOTTY
322  返回: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