From 3898c9e52db7b4e0fb167af6c22a147f76cdc275 Mon Sep 17 00:00:00 2001 From: Michal Rakowski Date: Thu, 26 Sep 2019 16:07:24 +0200 Subject: [PATCH 1/2] Add blk-mq.h include to linux_kernel_version.h Signed-off-by: Michal Rakowski --- modules/cas_cache/linux_kernel_version.h | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cas_cache/linux_kernel_version.h b/modules/cas_cache/linux_kernel_version.h index 981a1b0..f596883 100644 --- a/modules/cas_cache/linux_kernel_version.h +++ b/modules/cas_cache/linux_kernel_version.h @@ -38,6 +38,7 @@ #include #include #include +#include #include "generated_defines.h" From 0bd6fd4036eb00825310b7612240f39ab8eeb79c Mon Sep 17 00:00:00 2001 From: Michal Rakowski Date: Thu, 26 Sep 2019 13:10:34 +0200 Subject: [PATCH 2/2] configure: use blk_mq_end_request as a default instead of non-mq variant Signed-off-by: Michal Rakowski --- configure.d/1_blk_end_req.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.d/1_blk_end_req.conf b/configure.d/1_blk_end_req.conf index 628a5cb..bac9ce2 100644 --- a/configure.d/1_blk_end_req.conf +++ b/configure.d/1_blk_end_req.conf @@ -9,20 +9,23 @@ check() { cur_name=$(basename $2) config_file_path=$1 - if compile_module $cur_name "blk_end_request_all(NULL, 0)" "linux/blkdev.h" + if compile_module $cur_name "blk_mq_end_request(NULL, 0)" "linux/blk-mq.h" then echo $cur_name "1" >> $config_file_path - else + elif compile_module $cur_name "blk_end_request_all(NULL, 0)" "linux/blkdev.h" + then echo $cur_name "2" >> $config_file_path - fi + else + echo $cur_name "X" >> $config_file_path + fi } apply() { case "$1" in "1") - add_define "CAS_END_REQUEST_ALL blk_end_request_all" ;; - "2") add_define "CAS_END_REQUEST_ALL blk_mq_end_request" ;; + "2") + add_define "CAS_END_REQUEST_ALL blk_end_request_all" ;; *) exit 1 esac