From c7857f161a6b985ebf0518a6a953bf89c7171b56 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Thu, 3 Oct 2024 15:13:37 +0200 Subject: [PATCH 1/2] configure: make_req_type: Remove invalid negation Signed-off-by: Michal Mielewczyk --- configure.d/1_make_req_type.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.d/1_make_req_type.conf b/configure.d/1_make_req_type.conf index eea47a248..46ea610fa 100644 --- a/configure.d/1_make_req_type.conf +++ b/configure.d/1_make_req_type.conf @@ -46,12 +46,12 @@ check() { then # make_request_fn is of type void echo $cur_name "3" >> $config_file_path - elif ! compile_module $cur_name \ + elif compile_module $cur_name \ "struct request_queue *q; blk_qc_t y = q->make_request_fn(NULL);" "linux/blkdev.h"; then # make_request_fn is of type blk_qc_t echo $cur_name "4" >> $config_file_path - elif ! compile_module $cur_name \ + elif compile_module $cur_name \ "struct request_queue *q; int y = q->make_request_fn(NULL);" "linux/blkdev.h"; then # make_request_fn is of type int From e6d8af673f007c4bb8f90caad58e4f557e4641d7 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Thu, 3 Oct 2024 15:14:56 +0200 Subject: [PATCH 2/2] configure: make_req_type: Fix argument list The commit c62b37d96b6eb3ec5 in the Linux Kernel not only moved `make_request_fn` to `struct block_device_operations` and renamed it to `submit_bio` but in also removed the request_queue from the argument list. 8fbbf3173465c294ae67f4f96d691 missed the last change Signed-off-by: Michal Mielewczyk --- configure.d/1_make_req_type.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.d/1_make_req_type.conf b/configure.d/1_make_req_type.conf index 46ea610fa..e12dcc4a2 100644 --- a/configure.d/1_make_req_type.conf +++ b/configure.d/1_make_req_type.conf @@ -42,17 +42,17 @@ check() { # specific scenario # Mind the negation in the condition if ! compile_module $cur_name \ - "struct request_queue *q; int y = (int)q->make_request_fn(NULL);" "linux/blkdev.h"; + "struct request_queue *q; int y = (int)q->make_request_fn(NULL, NULL);" "linux/blkdev.h"; then # make_request_fn is of type void echo $cur_name "3" >> $config_file_path elif compile_module $cur_name \ - "struct request_queue *q; blk_qc_t y = q->make_request_fn(NULL);" "linux/blkdev.h"; + "struct request_queue *q; blk_qc_t y = q->make_request_fn(NULL, NULL);" "linux/blkdev.h"; then # make_request_fn is of type blk_qc_t echo $cur_name "4" >> $config_file_path elif compile_module $cur_name \ - "struct request_queue *q; int y = q->make_request_fn(NULL);" "linux/blkdev.h"; + "struct request_queue *q; int y = q->make_request_fn(NULL, NULL);" "linux/blkdev.h"; then # make_request_fn is of type int echo $cur_name "5" >> $config_file_path