函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\genhd.h Create Date:2022-07-27 06:45:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_capacity

函数原型:static inline sector_t get_capacity(struct gendisk *disk)

返回类型:sector_t

参数:

类型参数名称
struct gendisk *disk
476  返回:* nr_sects is protected by sequence counter. One might extend a * partition while IO is happening to it and update of nr_sects * can be non-atomic on 32bit machines with 64bit sector_t.
调用者
名称描述
generic_make_request_checks
register_disk
printk_all_partitionsprint a full list of all partitions - intended for places where the root* filesystem can't be mounted and thus to give the victim some idea of what* went wrong
show_partition
blk_add_partition
cmdline_partitionPurpose: allocate cmdline partitions.* Returns:* -1 if unable to read the partition table* 0 if this isn't our partition table* 1 if successful
blkdev_nr_zoneslkdev_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.
blkdev_report_zoneslkdev_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*
blkdev_allow_reset_all_zones
blkdev_zone_mgmtlkdev_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
blk_revalidate_zone_cbHelper function to check the validity of zones of a zoned block device.
guard_bio_eodThis allows us to do IO even on the odd last sectors* of a device, even if the block size is some multiple* of the physical sector size
check_disk_size_changeheck_disk_size_change - checks for disk size change and adjusts bdev size
bdev_disk_changed
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)
read_part_sector