summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-05-23 14:57:03 -0600
committerJens Axboe <axboe@kernel.dk>2019-05-23 14:57:52 -0600
commitce4d13ca162df4127ec3b5911553802c53396705 (patch)
treefd40f41dee5a7128f4c910f21523cca39266e5a8 /configure
parentde5ed0e4d398bc9d4576f9b2b82d7686989c27e1 (diff)
downloadfio-ce4d13ca162df4127ec3b5911553802c53396705.tar.gz
fio-ce4d13ca162df4127ec3b5911553802c53396705.tar.bz2
glusterfs: update for new API
Apparently glusterfs just changes their API as they see fit. Add a configure check for the newer version, which adds pre/post stat variables in a few random spots. This should fix compilation with v6.0 of the API. Fixes: https://github.com/axboe/fio/issues/781 Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index ee421663..b0052dc1 100755
--- a/configure
+++ b/configure
@@ -1790,6 +1790,24 @@ print_config "Gluster API use fadvise" "$gf_fadvise"
fi
##########################################
+# check for newer gfapi
+if test "$gfapi" = "yes" ; then
+gf_new="no"
+cat > $TMPC << EOF
+#include <glusterfs/api/glfs.h>
+
+int main(int argc, char **argv)
+{
+ return glfs_fsync(NULL, NULL, NULL) && glfs_ftruncate(NULL, 0, NULL, NULL);
+}
+EOF
+if compile_prog "" "-lgfapi -lglusterfs" "gf new api"; then
+ gf_new="yes"
+fi
+print_config "Gluster new API" "$gf_new"
+fi
+
+##########################################
# check for gfapi trim support
if test "$gf_trim" != "yes" ; then
gf_trim="no"
@@ -2576,6 +2594,9 @@ fi
if test "$gf_trim" = "yes" ; then
output_sym "CONFIG_GF_TRIM"
fi
+if test "$gf_new" = "yes" ; then
+ output_sym "CONFIG_GF_NEW_API"
+fi
if test "$libhdfs" = "yes" ; then
output_sym "CONFIG_LIBHDFS"
echo "FIO_HDFS_CPU=$FIO_HDFS_CPU" >> $config_host_mak