open-cas-linux/configure.d/2_bio_barrier.conf
Michal Mielewczyk 42f981918d Force ordering in configure script
To prevent using macros before they are defined, enfoce calling them in an
appropriate order.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-03 08:34:32 -04:00

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