summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2016-04-05 10:40:09 -0400
committerJeff Cody <jcody@redhat.com>2016-04-19 12:24:59 -0400
commitd85fa9eb87ba736d2d5ce342fc35f507c8fe29f2 (patch)
treeb5526240fd70adc449d032a58edd035c4abc2c3e /configure
parent5d4343e6c2682fb7fe66f1560d1823b5a26e7b2f (diff)
block/gluster: prevent data loss after i/o error
Upon receiving an I/O error after an fsync, by default gluster will dump its cache. However, QEMU will retry the fsync, which is especially useful when encountering errors such as ENOSPC when using the werror=stop option. When using caching with gluster, however, the last written data will be lost upon encountering ENOSPC. Using the write-behind-cache xlator option of 'resync-failed-syncs-after-fsync' should cause gluster to retain the cached data after a failed fsync, so that ENOSPC and other transient errors are recoverable. Unfortunately, we have no way of knowing if the 'resync-failed-syncs-after-fsync' xlator option is supported, so for now close the fd and set the BDS driver to NULL upon fsync error. Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index f1c307bfc6..ab54f3c8ee 100755
--- a/configure
+++ b/configure
@@ -298,6 +298,7 @@ coroutine=""
coroutine_pool=""
seccomp=""
glusterfs=""
+glusterfs_xlator_opt="no"
glusterfs_discard="no"
glusterfs_zerofill="no"
archipelago="no"
@@ -3400,6 +3401,9 @@ if test "$glusterfs" != "no" ; then
glusterfs="yes"
glusterfs_cflags=`$pkg_config --cflags glusterfs-api`
glusterfs_libs=`$pkg_config --libs glusterfs-api`
+ if $pkg_config --atleast-version=4 glusterfs-api; then
+ glusterfs_xlator_opt="yes"
+ fi
if $pkg_config --atleast-version=5 glusterfs-api; then
glusterfs_discard="yes"
fi
@@ -5342,6 +5346,10 @@ if test "$glusterfs" = "yes" ; then
echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
fi
+if test "$glusterfs_xlator_opt" = "yes" ; then
+ echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
+fi
+
if test "$glusterfs_discard" = "yes" ; then
echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
fi