Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dquot_init

Proto:static int __init dquot_init(void)

Type:int

Parameter:Nothing

2951  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
2953  register a sysctl hierarchy
2955  SLAB cache for dquot structures = kmem_cache_create - Create a cache.*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.*@align: The required alignment for the objects.*@flags: SLAB flags
2961  order = 0
2962  dquot_hash = Common helper functions. Never use with __GFP_HIGHMEM because the returned* address cannot represent highmem pages. Use alloc_pages and then kmap if* you need to access high mem.
2963  If Not dquot_hash Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
2966  When i < _DQST_DQSTAT_LAST cycle
2967  ret = percpu_counter_init( & counter[i], 0, GFP_KERNEL)
2968  If ret Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
2973  nr_hash = (1UL << order) * PAGE_SIZE / sizeof(structhlist_head)
2974  dq_hash_bits = log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (nr_hash)
2976  nr_hash = 1UL << dq_hash_bits
2977  dq_hash_mask = nr_hash - 1
2978  When i < nr_hash cycle INIT_HLIST_HEAD(dquot_hash + i)
2981  pr_info("VFS: Dquot-cache hash table entries: %ld (order %ld, %ld bytes)\n", nr_hash, order, (PAGE_SIZE << order))
2984  If register_shrinker( & dqcache_shrinker) Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
2987  Return 0