
To prevent using macros before they are defined, enfoce calling them in an appropriate order. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
33 lines
951 B
Bash
33 lines
951 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_FLUSH_FUA" "linux/fs.h"
|
|
then
|
|
add_define "CAS_WRITE_FLUSH_FUA \\
|
|
WRITE_FLUSH_FUA"
|
|
if compile_module "BIO_FUA" "linux/bio.h"
|
|
then
|
|
add_define "CAS_IS_WRITE_FLUSH_FUA(flags) \\
|
|
((BIO_FUA | BIO_FLUSH) == ((flags) & (BIO_FUA | BIO_FLUSH)))"
|
|
else
|
|
add_define "CAS_IS_WRITE_FLUSH_FUA(flags) \\
|
|
((REQ_FUA | CAS_REQ_FLUSH) == ((flags) & (REQ_FUA | CAS_REQ_FLUSH)))"
|
|
fi
|
|
elif compile_module "REQ_PREFLUSH" "linux/blk_types.h"
|
|
then
|
|
add_define "CAS_IS_WRITE_FLUSH_FUA(flags) \\
|
|
((REQ_PREFLUSH | REQ_FUA) == ((flags) & (REQ_PREFLUSH |REQ_FUA)))"
|
|
add_define "CAS_WRITE_FLUSH_FUA \\
|
|
(REQ_PREFLUSH | REQ_FUA)"
|
|
else
|
|
add_define "CAS_IS_WRITE_FLUSH_FUA(flags) \\
|
|
0"
|
|
add_define "CAS_WRITE_FLUSH_FUA \\
|
|
WRITE_BARRIER"
|
|
fi
|