Kernel 6.13: Introduce cas_queue_limits_is_misaligned()
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
parent
6a275773ce
commit
dbaeb21cb3
42
configure.d/1_queue_limits_misaligned.conf
Normal file
42
configure.d/1_queue_limits_misaligned.conf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
|
||||||
|
if compile_module $cur_name "struct queue_limits q; q.misaligned;" "linux/blkdev.h"
|
||||||
|
then
|
||||||
|
echo $cur_name 1 >> $config_file_path
|
||||||
|
else
|
||||||
|
echo $cur_name 2 >> $config_file_path
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
apply() {
|
||||||
|
case "$1" in
|
||||||
|
"1")
|
||||||
|
add_function "
|
||||||
|
static inline bool cas_queue_limits_is_misaligned(
|
||||||
|
struct queue_limits *lim)
|
||||||
|
{
|
||||||
|
return lim->misaligned;
|
||||||
|
}" ;;
|
||||||
|
"2")
|
||||||
|
add_function "
|
||||||
|
static inline bool cas_queue_limits_is_misaligned(
|
||||||
|
struct queue_limits *lim)
|
||||||
|
{
|
||||||
|
return lim->features & BLK_FLAG_MISALIGNED;
|
||||||
|
}" ;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
conf_run $@
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(c) 2012-2022 Intel Corporation
|
* Copyright(c) 2012-2022 Intel Corporation
|
||||||
* Copyright(c) 2024 Huawei Technologies
|
* Copyright(c) 2024-2025 Huawei Technologies
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -2405,7 +2405,8 @@ static int cache_mngt_check_bdev(struct ocf_mngt_cache_device_config *cfg,
|
|||||||
printk(KERN_WARNING "New cache device block properties "
|
printk(KERN_WARNING "New cache device block properties "
|
||||||
"differ from the previous one.\n");
|
"differ from the previous one.\n");
|
||||||
}
|
}
|
||||||
if (tmp_limits.misaligned) {
|
|
||||||
|
if (cas_queue_limits_is_misaligned(&tmp_limits)) {
|
||||||
reattach_properties_diff = true;
|
reattach_properties_diff = true;
|
||||||
printk(KERN_WARNING "New cache device block interval "
|
printk(KERN_WARNING "New cache device block interval "
|
||||||
"doesn't line up with the previous one.\n");
|
"doesn't line up with the previous one.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user