Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dget_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.

Proto:struct block_device *bdget_disk(struct gendisk *disk, int partno)

Type:struct block_device

Parameter:

TypeParameterName
struct gendisk *disk
intpartno
929  struct block_device * bdev = NULL
931  part = 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:
932  If part Then bdev = bdget(part_devt(part))
934  disk_put_part(part)
936  Return bdev
Caller
NameDescribe
register_disk
invalidate_partition
revalidate_diskvalidate_disk - wrapper for lower-level driver's revalidate_disk call-back*@disk: struct gendisk to be revalidated* This routine is a wrapper for lower-level driver's revalidate_disk* call-backs. It is used to do common pre and post operations needed
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)