diff options
author | Jinlong Chen <nickyc975@zju.edu.cn> | 2022-11-22 17:21:24 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-23 16:48:08 +0300 |
commit | e0cca8bc9cd8d6176921cb3f5f466d3ccfbc6b99 (patch) | |
tree | dea3c5eaf51c93df9492117fafb1200a824ea730 /block | |
parent | ac1171bd2c7a3a32dfbdd3c347919fee32b745a1 (diff) | |
download | linux-e0cca8bc9cd8d6176921cb3f5f466d3ccfbc6b99.tar.xz |
elevator: printk a warning if switching to a new io scheduler fails
printk a warning to indicate that the io scheduler has been set to none
if switching to a new io scheduler fails.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/d51ed0fb457db7a4f9cbb0dbce36d534e22be457.1669126766.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c index 01aa9f38f22e..1fa45717b1d6 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -683,6 +683,12 @@ int elevator_switch(struct request_queue *q, struct elevator_type *new_e) out_unfreeze: blk_mq_unquiesce_queue(q); blk_mq_unfreeze_queue(q); + + if (ret) { + pr_warn("elv: switch to \"%s\" failed, falling back to \"none\"\n", + new_e->elevator_name); + } + return ret; } |