Enabling CentOS 7.6

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
Michal Rakowski 2019-05-21 12:11:42 +02:00
parent 61e2af80bc
commit 869cb9c6ed
2 changed files with 42 additions and 4 deletions

38
configure vendored
View File

@ -66,3 +66,41 @@ kernel_not_supp_fail() {
} }
rm -f $DEFINE_FILE rm -f $DEFINE_FILE
compile_module "part_round_stats(1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_ROUND_STATS(q, cpu, part) part_round_stats(cpu, part)"
else
compile_module "part_round_stats(NULL, 1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_ROUND_STATS(q, cpu, part)\\"\
"\tpart_round_stats(q, cpu, part)"
fi
fi
compile_module "part_inc_in_flight(1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_INC_IN_FLIGHT(q, cpu, part)\\"\
"\tpart_inc_in_flight(cpu, part)"
else
compile_module "part_inc_in_flight(NULL, 1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_INC_IN_FLIGHT(q, cpu, part)\\"\
"\tpart_inc_in_flight(q, cpu, part)"
fi
fi
compile_module "part_dec_in_flight(1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_DEC_IN_FLIGHT(q, cpu, part)\\"\
"\tpart_dec_in_flight(cpu, part)"
else
compile_module "part_dec_in_flight(NULL, 1, 1)" "linux/genhd.h"
if [ $? -eq 0 ]; then
add_define "CAS_PART_DEC_IN_FLIGHT(q, cpu, part)\\"\
"\tpart_dec_in_flight(q, cpu, part)"
fi
fi

View File

@ -505,10 +505,10 @@ static inline void cas_generic_start_io_acct(struct request_queue *q,
{ {
int cpu = part_stat_lock(); int cpu = part_stat_lock();
part_round_stats(cpu, part); CAS_PART_ROUND_STATS(q, cpu, part);
part_stat_inc(cpu, part, ios[rw]); part_stat_inc(cpu, part, ios[rw]);
part_stat_add(cpu, part, sectors[rw], sectors); part_stat_add(cpu, part, sectors[rw], sectors);
part_inc_in_flight(part, rw); CAS_PART_INC_IN_FLIGHT(q, part, rw);
part_stat_unlock(); part_stat_unlock();
} }
@ -520,8 +520,8 @@ static inline void cas_generic_end_io_acct(struct request_queue *q,
int cpu = part_stat_lock(); int cpu = part_stat_lock();
part_stat_add(cpu, part, ticks[rw], duration); part_stat_add(cpu, part, ticks[rw], duration);
part_round_stats(cpu, part); CAS_PART_ROUND_STATS(q, cpu, part);
part_dec_in_flight(part, rw); CAS_PART_DEC_IN_FLIGHT(q, part, rw);
part_stat_unlock(); part_stat_unlock();
} }