Commit ac1171bd authored by Jinlong Chen's avatar Jinlong Chen Committed by Jens Axboe

elevator: update the document of elevator_switch

We no longer support falling back to the old io scheduler if switching to
the new one fails. Update the document to indicate that.

Fixes: a1ce35fa ("block: remove dead elevator code")
Signed-off-by: default avatarJinlong Chen <nickyc975@zju.edu.cn>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/94250961689ba7d2e67a7d9e7995a11166fedb31.1669126766.git.nickyc975@zju.edu.cnSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 93c68cc4
...@@ -650,10 +650,10 @@ void elevator_init_mq(struct request_queue *q) ...@@ -650,10 +650,10 @@ void elevator_init_mq(struct request_queue *q)
} }
/* /*
* switch to new_e io scheduler. be careful not to introduce deadlocks - * Switch to new_e io scheduler.
* 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 * If switching fails, we are most likely running out of memory and not able
* one, if the new one fails init for some reason. * to restore the old io scheduler, so leaving the io scheduler being none.
*/ */
int elevator_switch(struct request_queue *q, struct elevator_type *new_e) int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment