Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_gendisk - get partitioning information for a given device*@devt: device to get partitioning information for*@partno: returned partition index* This function gets the structure containing partitioning* information for the given device @devt.

Proto:struct gendisk *get_gendisk(dev_t devt, int *partno)

Type:struct gendisk

Parameter:

TypeParameterName
dev_tdevt
int *partno
873  struct gendisk * disk = NULL
875  If MAJOR(devt) != BLOCK_EXT_MAJOR Then
878  kobj = kobj_lookup(bdev_map, devt, partno)
879  If kobj Then disk = dev_to_disk(kobj_to_dev(kobj))
881  Else
884  spin_lock_bh( & For extended devt allocation. ext_devt_lock prevents look up* results from going away underneath its user.)
885  part = dr_find() - Return pointer for given ID
887  partno = partno
890  spin_unlock_bh( & For extended devt allocation. ext_devt_lock prevents look up* results from going away underneath its user.)
893  If Not disk Then Return NULL
900  lock for reading
901  If Value for the false possibility is greater at compile time((flags & GENHD_FL_HIDDEN) || !(flags & GENHD_FL_UP)) Then
903  lease a read lock
904  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
905  disk = NULL
906  Else
907  lease a read lock
909  Return disk
Caller
NameDescribe
blkcg_conf_get_disklkg_conf_prep - parse and prepare for per-blkg config update*@inputp: input string pointer* Parse the device node prefix part, MAJ:MIN, of per-blkg config update* from @input and get and return the matching gendisk. *@inputp is
software_resumesoftware_resume - Resume from a saved hibernation image.* This routine is called as a late initcall, when all devices have been* discovered and initialized already.* The image reading code is called to see if there is a hibernation image