Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lkdev_nr_zones - Get number of zones*@disk: Target gendisk* Return the total number of zones of a zoned block device. For a block* device without zone capabilities, the number of zones is always 0.

Proto:unsigned int blkdev_nr_zones(struct gendisk *disk)

Type:unsigned int

Parameter:

TypeParameterName
struct gendisk *disk
82  zone_sectors = blk_queue_zone_sectors(queue)
84  If Not blk_queue_is_zoned(queue) Then Return 0
86  Return get_capacity(disk) + zone_sectors - 1 >> log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (zone_sectors)