Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:disk_alloc_events

Proto:static void disk_alloc_events(struct gendisk *disk)

Type:void

Parameter:

TypeParameterName
struct gendisk *disk
2025  If Not check_events || Not supported events Then Return
2028  ev = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2029  If Not ev Then
2030  pr_warn("%s: failed to initialize events\n", name of major driver )
2031  Return
2034  Initialization list head
2035  he associated disk = disk
2036  Process spin lock initialization( & lock)
2037  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & protects blocking )
2038  vent blocking depth = 1
2039  rval, -1 for default = -1
2040  INIT_DELAYED_WORK( & dwork, Separate this part out so that a different pointer for clearing_ptr can be* passed in for disk_clear_events.)
2042  ev = ev
Caller
NameDescribe
__device_add_disk__device_add_disk - add disk information to kernel list*@parent: parent device for the disk*@disk: per-device partitioning information*@groups: Additional per-device sysfs groups*@register_queue: register the queue if set to true* This function registers