open-cas-linux/configure.d/1_mq_flags.conf
Robert Baldyga 6aac52ed22 Support kernel 6.14
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2025-03-27 19:57:10 +01:00

62 lines
1.2 KiB
Bash

#!/bin/bash
#
# Copyright(c) 2012-2022 Intel Corporation
# Copyright(c) 2025 Huawei Technologies
# SPDX-License-Identifier: BSD-3-Clause
#
. $(dirname $3)/conf_framework.sh
check() {
cur_name=$(basename $2)
config_file_path=$1
output=0
if compile_module $cur_name "BLK_MQ_F_STACKING ;" "linux/blk-mq.h"
then
output=1
fi
if compile_module $cur_name "BLK_MQ_F_BLOCKING ;" "linux/blk-mq.h"
then
output=$((output+2))
fi
if compile_module $cur_name "BLK_MQ_F_SHOULD_MERGE ;" "linux/blk-mq.h"
then
output=$((output+4))
fi
echo $cur_name $output >> $config_file_path
}
apply() {
arg=$1
if ((arg & 1))
then
add_define "CAS_BLK_MQ_F_STACKING \\
BLK_MQ_F_STACKING"
else
add_define "CAS_BLK_MQ_F_STACKING 0"
fi
if ((arg & 2))
then
add_define "CAS_BLK_MQ_F_BLOCKING \\
BLK_MQ_F_BLOCKING"
else
add_define "CAS_BLK_MQ_F_BLOCKING 0"
fi
if ((arg & 4))
then
add_define "CAS_BLK_MQ_F_SHOULD_MERGE \\
BLK_MQ_F_SHOULD_MERGE"
else
add_define "CAS_BLK_MQ_F_SHOULD_MERGE 0"
fi
}
conf_run $@