提交 340ff321 编写于 作者: J Jens Axboe

elevator: remove redundant warnings on IO scheduler switch

We warn twice for switching to a scheduler, if that switch fails.
As we also report the failure in the return value to the
sysfs write, remove the dmesg induced failures.

Keep the failure print for warning to switch to the kconfig
selected IO scheduler, as we can't report errors for that in
any other way.
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 43c1b3d6
...@@ -1062,10 +1062,8 @@ static int __elevator_change(struct request_queue *q, const char *name) ...@@ -1062,10 +1062,8 @@ static int __elevator_change(struct request_queue *q, const char *name)
strlcpy(elevator_name, name, sizeof(elevator_name)); strlcpy(elevator_name, name, sizeof(elevator_name));
e = elevator_get(strstrip(elevator_name), true); e = elevator_get(strstrip(elevator_name), true);
if (!e) { if (!e)
printk(KERN_ERR "elevator: type %s not found\n", elevator_name);
return -EINVAL; return -EINVAL;
}
if (q->elevator && if (q->elevator &&
!strcmp(elevator_name, q->elevator->type->elevator_name)) { !strcmp(elevator_name, q->elevator->type->elevator_name)) {
...@@ -1105,7 +1103,6 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name, ...@@ -1105,7 +1103,6 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
if (!ret) if (!ret)
return count; return count;
printk(KERN_ERR "elevator: switch to %s failed\n", name);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册