函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-ioc.c Create Date:2022-07-27 18:39:40
Last Modify:2020-03-17 23:16:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:create_task_io_context

函数原型:int create_task_io_context(struct task_struct *task, gfp_t gfp_flags, int node)

返回类型:int

参数:

类型参数名称
struct task_struct *task
gfp_tgfp_flags
intnode
248  ioc等于在指定节点上分配一个对象
250  如果此条件成立可能性小(为编译器优化)(!ioc)则返回:负ENOMEM
254  atomic_long_set( & 引用计数, 1)
255  atomic_set( & 对应进程, 1)
256  atomic_set( & 活跃引用, 1)
257  spin_lock_init( & 自旋锁)
258  INIT_RADIX_TREE( & icq_tree, DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear)
259  INIT_HLIST_HEAD( & icq_list)
260  INIT_WORK( & release_work, Slow path for ioc release in put_io_context(). Performs double-lock* dancing to unlink all icq's and then frees ioc.)
269  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
270  如果非io_contexttask恒等于当前进程或非flags按位与Getting shut down 的值的值则io_context等于ioc
273  否则kmem_cache_free(For io context allocations, ioc)
276  ret等于如果io_context则0否则负EBUSY
278  task_unlock(task)
280  返回:ret
调用者
名称描述
get_task_io_contextget_task_io_context - get io_context of a task*@task: task of interest*@gfp_flags: allocation flags, used if allocation is necessary*@node: allocation node, used if allocation is necessary* Return io_context of @task