Whamcloud - gitweb
LU-11913 utils: allow "mq-deadline" as scheduler 26/34426/2
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 1 Feb 2019 20:10:40 +0000 (13:10 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Apr 2019 06:20:43 +0000 (06:20 +0000)
Allow the "mq-deadline" scheduler for multi-queue block devices, in
addition to just "noop" and "deadline".  Explicitly add "deadline"
as a valid option, in case the default scheduler is changed.

Lustre-change: https://review.whamcloud.com/34163
Lustre-commit: 4326ab53b7142e474c75b46da2361d148a2f7ce8

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2cb0878188aea43f88c503ea70a699be083ebbe5
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34426
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/libmount_utils_ldiskfs.c

index c1f79ae..e5fff82 100644 (file)
@@ -1173,7 +1173,9 @@ static int tune_block_dev_scheduler(const char *sys_path, const char *new_sched)
        *e = '\0';
 
        if (strcmp(old_sched, "noop") == 0 ||
-           strcmp(old_sched, new_sched) == 0)
+           strcmp(old_sched, "deadline") == 0 ||
+           strcmp(old_sched, "mq-deadline") == 0 ||
+           strstr(old_sched, new_sched) == 0)
                return 0;
 
        rc = write_file(path, new_sched);