函数逻辑报告 |
Source Code:block\elevator.c |
Create Date:2022-07-27 18:33:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:elevator_switch_mq
函数原型:int elevator_switch_mq(struct request_queue *q, struct elevator_type *new_e)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct request_queue * | q | |
struct elevator_type * | new_e |
586 | lockdep_assert_held( & sysfs_lock) |
588 | 如果elevator则 |
592 | ioc_clear_queue(q) |
593 | elevator_exit(q, elevator) |
596 | ret等于blk_mq_init_sched(q, new_e) |
600 | 如果new_e则 |
601 | ret等于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. |
602 | 如果ret则 |
603 | elevator_exit(q, elevator) |
604 | 转到:out |
608 | 如果new_e则blk_add_trace_msg(q, "elv switch: %s", elevator_name) |
610 | 否则blk_add_trace_msg(q, "elv switch: none") |
613 | out : |
614 | 返回:ret |
名称 | 描述 |
---|---|
elevator_switch | switch to new_e io scheduler. be careful not to introduce deadlocks -* we don't free the old io scheduler, before we have allocated what we* need for the new one. this way we have a chance of going back to the old |
blk_mq_elv_switch_none | Cache the elevator_type in qe pair list and switch the* io scheduler to 'none' |
blk_mq_elv_switch_back |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |