
Functions and macros dependent on different kernel versions are now generated before compilation basing on current kernel capabilities instead of hardcoding them for specific kernels. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
22 lines
601 B
Bash
22 lines
601 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright(c) 2012-2019 Intel Corporation
|
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
#
|
|
|
|
. `dirname $0`/conf_framework
|
|
|
|
if compile_module "RQF_SOFTBARRIER" "linux/blkdev.h"
|
|
then
|
|
add_define "CAS_CHECK_BARRIER(bio) \\
|
|
((CAS_BIO_OP_FLAGS(bio) & RQF_SOFTBARRIER) != 0)"
|
|
elif compile_module "REQ_SOFTBARRIER" "linux/blk_types.h"
|
|
then
|
|
add_define "CAS_CHECK_BARRIER(bio) \\
|
|
((CAS_BIO_OP_FLAGS(bio) & REQ_SOFTBARRIER) != 0)"
|
|
elif compile_module "BIO_RW_BARRIER" "linux/fs.h"
|
|
then
|
|
add_define "CAS_CHECK_BARRIER(bio) \\
|
|
(bio_rw_flagged((bio), BIO_RW_BARRIER))"
|
|
fi
|