From df3a429ae82c0f45becdfab105617701d75e0f05 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 28 May 2017 12:01:14 +0530 Subject: gluster: add support for PREALLOC_MODE_FALLOC Add missing support for "preallocation=falloc" to the Gluster block driver. This change bases its logic on that of block/file-posix.c and removed the gluster_supports_zerofill() and qemu_gluster_zerofill() functions in favour of #ifdef checks in an easy to read switch-statement. Both glfs_zerofill() and glfs_fallocate() have been introduced with GlusterFS 3.5.0 (pkg-config glusterfs-api = 6). A #define for the availability of glfs_fallocate() has been added to ./configure. Reported-by: Satheesaran Sundaramoorthi Signed-off-by: Niels de Vos Message-id: 20170528063114.28691-1-ndevos@redhat.com URL: https://bugzilla.redhat.com/1450759 Signed-off-by: Niels de Vos Signed-off-by: Jeff Cody --- configure | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 0586ec9c64..21944eaa05 100755 --- a/configure +++ b/configure @@ -300,6 +300,7 @@ seccomp="" glusterfs="" glusterfs_xlator_opt="no" glusterfs_discard="no" +glusterfs_fallocate="no" glusterfs_zerofill="no" gtk="" gtkabi="" @@ -3583,6 +3584,7 @@ if test "$glusterfs" != "no" ; then glusterfs_discard="yes" fi if $pkg_config --atleast-version=6 glusterfs-api; then + glusterfs_fallocate="yes" glusterfs_zerofill="yes" fi else @@ -5757,6 +5759,10 @@ if test "$glusterfs_discard" = "yes" ; then echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak fi +if test "$glusterfs_fallocate" = "yes" ; then + echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak +fi + if test "$glusterfs_zerofill" = "yes" ; then echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak fi -- cgit v1.2.1