Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-ioc.c Create Date:2022-07-28 17:04:24
Last Modify:2020-03-17 23:16:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:create_task_io_context

Proto:int create_task_io_context(struct task_struct *task, gfp_t gfp_flags, int node)

Type:int

Parameter:

TypeParameterName
struct task_struct *task
gfp_tgfp_flags
intnode
248  ioc = kmem_cache_alloc_node(For io context allocations, gfp_flags | __GFP_ZERO, node)
250  If Value for the false possibility is greater at compile time(!ioc) Then Return -ENOMEM
254  atomic_long_set( & refcount, 1)
255  atomic_set( & nr_tasks, 1)
256  atomic_set( & active_ref, 1)
257  Process spin lock initialization( & all the fields below are protected by this lock )
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  If Not io_context && ( task == current process || Not (flags & Getting shut down ) ) Then io_context = ioc
273  Else kmem_cache_free(For io context allocations, ioc)
276  ret = If io_context Then 0 Else -EBUSY
278  task_unlock(task)
280  Return ret
Caller
NameDescribe
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