Kernel 6.13: Rearrange definitions of cas_copy_queue_limits()
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
parent
14f375f135
commit
eff9ad3c9d
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright(c) 2012-2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies
|
||||
# Copyright(c) 2024-2025 Huawei Technologies
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -12,18 +12,18 @@ check() {
|
||||
cur_name=$(basename $2)
|
||||
config_file_path=$1
|
||||
|
||||
if compile_module $cur_name "struct queue_limits q; q.limits_aux;" "linux/blkdev.h"
|
||||
then
|
||||
echo $cur_name "1" >> $config_file_path
|
||||
elif compile_module $cur_name "struct queue_limits q; q.max_write_zeroes_sectors;" "linux/blkdev.h"
|
||||
if compile_module $cur_name "struct queue_limits q; q.max_write_zeroes_sectors;" "linux/blkdev.h"
|
||||
then
|
||||
if compile_module $cur_name "struct queue_limits q; q.max_write_same_sectors;" "linux/blkdev.h"
|
||||
then
|
||||
echo $cur_name "2" >> $config_file_path
|
||||
echo $cur_name "1" >> $config_file_path
|
||||
else
|
||||
echo $cur_name "3" >> $config_file_path
|
||||
echo $cur_name "2" >> $config_file_path
|
||||
fi
|
||||
elif compile_module $cur_name "struct queue_limits q; q.max_write_same_sectors;" "linux/blkdev.h"
|
||||
then
|
||||
echo $cur_name "3" >> $config_file_path
|
||||
elif compile_module $cur_name "struct queue_limits q; q.limits_aux;" "linux/blkdev.h"
|
||||
then
|
||||
echo $cur_name "4" >> $config_file_path
|
||||
else
|
||||
@ -37,6 +37,55 @@ apply() {
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_same_sectors = 0;
|
||||
exp_q->limits.max_write_zeroes_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
"2")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_zeroes_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
"3")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_same_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
"4")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
struct queue_limits_aux *l_aux = exp_q->limits.limits_aux;
|
||||
exp_q->limits = *cache_q_limits;
|
||||
@ -63,55 +112,6 @@ apply() {
|
||||
if (queue_virt_boundary(cache_q))
|
||||
queue_flag_set(QUEUE_FLAG_NOMERGES, cache_q);
|
||||
}" ;;
|
||||
"2")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_same_sectors = 0;
|
||||
exp_q->limits.max_write_zeroes_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
"3")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_zeroes_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
"4")
|
||||
add_function "
|
||||
static inline void cas_copy_queue_limits(struct request_queue *exp_q,
|
||||
struct queue_limits *cache_q_limits, struct request_queue *core_q)
|
||||
{
|
||||
exp_q->limits = *cache_q_limits;
|
||||
exp_q->limits.max_sectors = core_q->limits.max_sectors;
|
||||
exp_q->limits.max_hw_sectors = core_q->limits.max_hw_sectors;
|
||||
exp_q->limits.max_segments = core_q->limits.max_segments;
|
||||
exp_q->limits.max_write_same_sectors = 0;
|
||||
}"
|
||||
|
||||
add_function "
|
||||
static inline void cas_cache_set_no_merges_flag(struct request_queue *cache_q)
|
||||
{
|
||||
}" ;;
|
||||
|
||||
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user