Function report | 
Source Code:block\elevator.c | 
Create Date:2022-07-28 16:58:01 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:elevator_switch_mq
Proto:int elevator_switch_mq(struct request_queue *q, struct elevator_type *new_e)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct request_queue * | q | |
| struct elevator_type * | new_e | 
| 586 | lockdep_assert_held( & sysfs_lock) | 
| 588 | If elevator Then | 
| 592 | ioc_clear_queue(q) | 
| 593 | elevator_exit(q, elevator) | 
| 596 | ret = blk_mq_init_sched(q, new_e) | 
| 600 | If new_e Then | 
| 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 | If ret Then | 
| 603 | elevator_exit(q, elevator) | 
| 604 | Go to out | 
| 608 | If new_e Then blk_add_trace_msg(q, "elv switch: %s", elevator_name) | 
| 610 | Else blk_add_trace_msg(q, "elv switch: none") | 
| 613 | out : | 
| 614 | Return ret | 
| Name | Describe | 
|---|---|
| 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 | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |