# default options
show_help="no"
exit_val=0
-gfio="no"
+gfio_check="no"
libhdfs="no"
# parse options
--build-32bit-win) build_32bit_win="yes"
;;
--enable-gfio)
- gfio="yes"
+ gfio_check="yes"
;;
--disable-numa) disable_numa="yes"
;;
##########################################
# Check if we have required gtk/glib support for gfio
-if test "$gfio" = "yes" ; then
+gfio="no"
+if test "$gfio_check" = "yes" ; then
cat > $TMPC << EOF
#include <glib.h>
#include <cairo.h>
fi
fi
-echo "gtk 2.18 or higher $gfio"
+if test "$gfio_check" = "yes" ; then
+ echo "gtk 2.18 or higher $gfio"
+fi
# Check whether we have getrusage(RUSAGE_THREAD)
rusage_thread="no"
fi
echo "Rados Block Device engine $rbd"
+##########################################
+# check for rbd_invaidate_cache()
+rbd_inval="no"
+if test "$rbd" = "yes"; then
+cat > $TMPC << EOF
+#include <rbd/librbd.h>
+
+int main(int argc, char **argv)
+{
+ rbd_image_t image;
+
+ return rbd_invalidate_cache(image);
+}
+EOF
+if compile_prog "" "-lrbd -lrados" "rbd"; then
+ rbd_inval="yes"
+fi
+echo "rbd_invalidate_cache $rbd_inval"
+fi
+
##########################################
# Check whether we have setvbuf
setvbuf="no"
##########################################
# check for gfapi fadvise support
+if test "$gfapi" = "yes" ; then
gf_fadvise="no"
cat > $TMPC << EOF
#include <glusterfs/api/glfs.h>
return 0;
}
EOF
-
if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
gf_fadvise="yes"
fi
echo "Gluster API use fadvise $gf_fadvise"
+fi
+
+##########################################
+# check for gfapi trim support
+gf_trim="no"
+if test "$gfapi" = "yes" ; then
+cat > $TMPC << EOF
+#include <glusterfs/api/glfs.h>
+
+int main(int argc, char **argv)
+{
+ return glfs_discard_async(NULL, 0, 0);
+}
+EOF
+if compile_prog "" "-lgfapi -lglusterfs" "gf trim"; then
+ gf_trim="yes"
+fi
+echo "Gluster API trim support $gf_trim"
+fi
##########################################
# Check if we support stckf on s390
if test "$rbd" = "yes" ; then
output_sym "CONFIG_RBD"
fi
+if test "$rbd_inval" = "yes" ; then
+ output_sym "CONFIG_RBD_INVAL"
+fi
if test "$setvbuf" = "yes" ; then
output_sym "CONFIG_SETVBUF"
fi
if test "$gf_fadvise" = "yes" ; then
output_sym "CONFIG_GF_FADVISE"
fi
+if test "$gf_trim" = "yes" ; then
+ output_sym "CONFIG_GF_TRIM"
+fi
if test "$libhdfs" = "yes" ; then
output_sym "CONFIG_LIBHDFS"
fi