Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-zoned.c Create Date:2022-07-28 18:06:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:BLKRESETZONE, BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE ioctl processing.* Called from blkdev_ioctl.

Proto:int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
fmode_tmode
unsigned intcmd
unsigned longarg
281  __user * argp = arg
286  If Not argp Then Return -EINVAL
289  q = bdev_get_queue(bdev)
290  If Not q Then Return -ENXIO
293  If Not blk_queue_is_zoned(q) Then Return -ENOTTY
296  If Not Check operation authority Then Return -EACCES
299  If Not (mode & le is open for writing ) Then Return -EBADF
302  If copy_from_user( & zrange, argp, sizeof(structblk_zone_range)) Then Return -EFAULT
306  Case cmd == BLKRESETZONE
307  op = REQ_OP_ZONE_RESET
308  Break
309  Case cmd == BLKOPENZONE
310  op = REQ_OP_ZONE_OPEN
311  Break
312  Case cmd == BLKCLOSEZONE
313  op = REQ_OP_ZONE_CLOSE
314  Break
315  Case cmd == BLKFINISHZONE
316  op = REQ_OP_ZONE_FINISH
317  Break
318  Default
319  Return -ENOTTY
322  Return 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