Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\elevator.c Create Date:2022-07-28 16:57:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lv_register_queue is called from either blk_register_queue or* elevator_switch, elevator switch is prevented from being happen* in the two paths, so it is safe to not hold q->sysfs_lock.

Proto:int elv_register_queue(struct request_queue *q, bool uevent)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
booluevent
490  e = elevator
493  error = kobject_add() - The main kobject add function.*@kobj: the kobject to add*@parent: pointer to the parent of the kobject.*@fmt: format to name the kobject with.* The kobject name is set and added to the kobject hierarchy in this* function.
494  If Not error Then
495  attr = elevator_attrs
496  If attr Then
497  When name cycle
498  If sysfs_create_file( & kobj, & attr) Then Break
500  attr++
503  If uevent Then kobject_uevent - notify userspace by sending an uevent*@kobj: struct kobject that the action is happening to*@action: action that is happening* Returns 0 if kobject_uevent() is completed with success or the* corresponding error when it fails.
506  registered = 1
508  Return error
Caller
NameDescribe
elevator_switch_mq
blk_register_queuelk_register_queue - register a block layer queue with sysfs*@disk: Disk of which the request queue should be registered with sysfs.