Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bjagg_hints_get - obtains hints instance*@objagg: objagg instance*@opt_algo_type: type of hints finding algorithm* Note: all locking must be provided by the caller.* According to the algo type, the existing objects of objagg instance

Proto:struct objagg_hints *objagg_hints_get(struct objagg *objagg, enum objagg_opt_algo_type opt_algo_type)

Type:struct objagg_hints

Parameter:

TypeParameterName
struct objagg *objagg
enum objagg_opt_algo_typeopt_algo_type
943  algo = objagg_opt_algos[opt_algo_type]
947  objagg_hints = 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).
948  If Not objagg_hints Then Return ERR_PTR( - ENOMEM)
951  ops = ops
952  refcount = 1
954  Initialization list head
956  key_len = obj_size
957  key_offset = offsetof(structobjagg_hints_node, obj)
959  head_offset = offsetof(structobjagg_hints_node, ht_node)
961  obj_cmpfn = objagg_hints_obj_cmp
963  err = hashtable_init - initialize a new hash table*@ht: hash table to be initialized*@params: configuration parameters* Initializes a new hash table based on the provided configuration* parameters
964  If err Then Go to err_rhashtable_init
967  err = fillup_hints(objagg_hints, objagg)
968  If err Then Go to err_fillup_hints
971  If WARN_ON(node_count != obj_count) Then
972  err = -EINVAL
973  Go to err_node_count_check
976  Return objagg_hints
978  err_node_count_check :
979  err_fillup_hints :
980  objagg_hints_flush(objagg_hints)
981  rhashtable_destroy( & node_ht)
982  err_rhashtable_init :
983  kfree(objagg_hints)
984  Return ERR_PTR(err)
Caller
NameDescribe
test_hints_case