函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:disk_get_part - get partition*@disk: disk to look partition from*@partno: partition number* Look for partition @partno from @disk. If found, increment* reference count and return it.* CONTEXT:* Don't care.* RETURNS:

函数原型:struct hd_struct *disk_get_part(struct gendisk *disk, int partno)

返回类型:struct hd_struct

参数:

类型参数名称
struct gendisk *disk
intpartno
138  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
139  part等于__disk_get_part(disk, partno)
140  如果partget_device - atomically increment the reference count for the device.
142  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
144  返回:part
调用者
名称描述
blkpg_ioctl
bdget_diskdget_disk - do bdget() by gendisk and partition number*@disk: gendisk of interest*@partno: partition number* Find partition @partno from @disk, do bdget() on it.* CONTEXT:* Don't care.* RETURNS:* Resulting block_device on success, NULL on failure.
blk_lookup_devt
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)
devt_from_partuuiddevt_from_partuuid - looks up the dev_t of a partition by its UUID*@uuid_str: char array containing ascii UUID* The function will return the first partition which contains a matching* UUID value in its partition_meta_info struct. This does not search