函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-cgroup.c Create Date:2022-07-27 19:15:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lkg_conf_prep - parse and prepare for per-blkg config update*@blkcg: target block cgroup*@pol: target policy*@input: input string*@ctx: blkg_conf_ctx to be filled* Parse per-blkg config update from @input and initialize @ctx with the* result

函数原型:int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, char *input, struct blkg_conf_ctx *ctx)__acquires(rcu) __acquires(&disk->queue->queue_lock)

返回类型:int

参数:

类型参数名称
struct blkcg *blkcg
const struct blkcg_policy *pol
char *input
struct blkg_conf_ctx *ctx
636  disk等于lkg_conf_prep - parse and prepare for per-blkg config update*@inputp: input string pointer* Parse the device node prefix part, MAJ:MIN, of per-blkg config update* from @input and get and return the matching gendisk. *@inputp is
637  如果是错误则返回:错误
640  q等于queue
642  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
643  spin_lock_irq( & queue_lock)
645  blkg等于Performs queue bypass and policy enabled checks then looks up blkg.
646  如果是错误
647  ret等于错误
648  转到:fail_unlock
651  如果blkg则转到:success
658  当(true)循环
659  pos等于blkcg
663  parent等于lkcg_parent - get the parent of a blkcg*@blkcg: blkcg of interest* Return the parent blkcg of @blkcg. Can be called anytime.
665  pos等于parent
670  spin_unlock_irq( & queue_lock)
671  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
673  new_blkg等于lkg_alloc - allocate a blkg*@blkcg: block cgroup the new blkg is associated with*@q: request_queue the new blkg is associated with*@gfp_mask: allocation mask to use* Allocate a new blkg assocating @blkcg and @q.
675  ret等于负ENOMEM
676  转到:fail
679  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
680  spin_lock_irq( & queue_lock)
682  blkg等于Performs queue bypass and policy enabled checks then looks up blkg.
683  如果是错误
684  ret等于错误
685  转到:fail_unlock
688  如果blkg
690  否则
692  如果是错误
693  ret等于错误
694  转到:fail_unlock
698  如果pos恒等于blkcg则转到:success
701  success :
702  disk等于disk
703  blkg等于blkg
704  body等于input
705  返回:0
707  fail_unlock :
708  spin_unlock_irq( & queue_lock)
709  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
710  fail :
711  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
718  如果ret恒等于负EBUSY
719  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
720  ret等于restart_syscall()
722  返回:ret
调用者
名称描述
tg_set_conf
tg_set_limit
iolatency_set_limit
ioc_weight_write