projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81eaca4
)
block: exit elv_iosched_show early when I/O schedulers are not supported
author
Christoph Hellwig
<hch@lst.de>
Sun, 30 Oct 2022 10:07:10 +0000
(11:07 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 1 Nov 2022 14:02:47 +0000
(08:02 -0600)
If the tag_set has BLK_MQ_F_NO_SCHED flag set we will never show any
scheduler, so exit early.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link:
https://lore.kernel.org/r/20221030100714.876891-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/elevator.c
patch
|
blob
|
blame
|
history
diff --git
a/block/elevator.c
b/block/elevator.c
index 9793af0a75a7d8ef6e2dd29c43bf6f34158a4f86..fa58905e6b3e9638135a2fb5515e6449d3af47fd 100644
(file)
--- a/
block/elevator.c
+++ b/
block/elevator.c
@@
-783,7
+783,7
@@
ssize_t elv_iosched_show(struct request_queue *q, char *name)
struct elevator_type *__e;
int len = 0;
- if (!
queue_is_mq
(q))
+ if (!
elv_support_iosched
(q))
return sprintf(name, "none\n");
if (!q->elevator)
@@
-797,8
+797,7
@@
ssize_t elv_iosched_show(struct request_queue *q, char *name)
len += sprintf(name+len, "[%s] ", elv->elevator_name);
continue;
}
- if (elv_support_iosched(q) &&
- elevator_match(__e, __e->elevator_name,
+ if (elevator_match(__e, __e->elevator_name,
q->required_elevator_features))
len += sprintf(name+len, "%s ", __e->elevator_name);
}