Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:BLKREPORTZONE ioctl processing.* Called from blkdev_ioctl.

Proto:int blkdev_report_zones_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
237  __user * argp = arg
243  If Not argp Then Return -EINVAL
246  q = bdev_get_queue(bdev)
247  If Not q Then Return -ENXIO
250  If Not blk_queue_is_zoned(q) Then Return -ENOTTY
253  If Not Check operation authority Then Return -EACCES
256  If copy_from_user( & rep, argp, sizeof(structblk_zone_report)) Then Return -EFAULT
259  If Not nr_zones Then Return -EINVAL
262  zones = argp + sizeof(structblk_zone_report)
263  ret = lkdev_report_zones - Get zones information*@bdev: Target block device*@sector: Sector from which to report zones*@nr_zones: Maximum number of zones to report*@cb: Callback function called for each reported zone*@data: Private data for the callback*
265  If ret < 0 Then Return ret
268  nr_zones = ret
269  If copy_to_user(argp, & rep, sizeof(structblk_zone_report)) Then Return -EFAULT
271  Return 0