Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_stat_alloc_callback

Proto:struct blk_stat_callback *blk_stat_alloc_callback(void (*timer_fn)(struct blk_stat_callback *), int (*bucket_fn)(const struct request *), unsigned int buckets, void *data)

Type:struct blk_stat_callback

Parameter:

TypeParameterName
void (*timer_fn
int (*bucket_fn
unsigned intbuckets
void *data
109  cb = Allocation memory
110  If Not cb Then Return NULL
113  @stat: Array of statistics buckets. = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
115  If Not @stat: Array of statistics buckets. Then
116  kfree(cb)
117  Return NULL
119  @cpu_stat: Per-cpu statistics buckets. = allocate one copy of the object for every present
121  If Not @cpu_stat: Per-cpu statistics buckets. Then
122  kfree(@stat: Array of statistics buckets.)
123  kfree(cb)
124  Return NULL
127  timer_fn = timer_fn
128  bucket_fn = bucket_fn
129  @data: Private pointer for the user. = data
130  @buckets: Number of statistics buckets. = buckets
131  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & @timer: Timer for the next callback invocation., blk_stat_timer_fn, 0)
133  Return cb
Caller
NameDescribe
wbt_init