
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>
33 lines
715 B
Bash
33 lines
715 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright(c) 2012-2019 Intel Corporation
|
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
#
|
|
|
|
. `dirname $0`/conf_framework
|
|
|
|
if compile_module "WRITE_FUA" "linux/fs.h"
|
|
then
|
|
add_define "CAS_WRITE_FUA \\
|
|
WRITE_FUA"
|
|
if compile_module "BIO_FUA" "linux/bio.h"
|
|
then
|
|
add_define "CAS_IS_WRITE_FUA(flags) \\
|
|
((flags) & BIO_FUA)"
|
|
else
|
|
add_define "CAS_IS_WRITE_FUA(flags) \\
|
|
((flags) & REQ_FUA)"
|
|
fi
|
|
elif compile_module "REQ_FUA" "linux/blk_types.h"
|
|
then
|
|
add_define "CAS_IS_WRITE_FUA(flags) \\
|
|
((flags) & REQ_FUA)"
|
|
add_define "CAS_WRITE_FUA \\
|
|
REQ_FUA"
|
|
else
|
|
add_define "CAS_IS_WRITE_FUA(flags) \\
|
|
0"
|
|
add_define "CAS_WRITE_FUA \\
|
|
WRITE_BARRIER"
|
|
fi
|