Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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*

Proto:int blkdev_report_zones(struct block_device *bdev, sector_t sector, unsigned int nr_zones, report_zones_cb cb, void *data)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
sector_tsector
unsigned intnr_zones
report_zones_cbcb
void *data
112  disk = bd_disk
113  capacity = get_capacity(disk)
115  If Not blk_queue_is_zoned(bdev_get_queue(bdev)) || WARN_ON_ONCE(!report_zones) Then Return -EOPNOTSUPP
119  If Not nr_zones || sector >= capacity Then Return 0
122  Return report_zones(disk, sector, nr_zones, cb, data)
Caller
NameDescribe
blkdev_report_zones_ioctlBLKREPORTZONE ioctl processing.* Called from blkdev_ioctl.