Add FAILFAST support

ZFS works best when it is notified as soon as possible when a device
failure occurs.  This allows it to immediately start any recovery
actions which may be needed.  In theory Linux supports a flag which
can be set on bio's called FAILFAST which provides this quick
notification by disabling the retry logic in the lower scsi layers.

That's the theory at least.  In practice is turns out that while the
flag exists you oddly have to set it with the BIO_RW_AHEAD flag.
And even when it's set it you may get retries in the low level
drivers decides that's the right behavior, or if you don't get the
right error codes reported to the scsi midlayer.

Unfortunately, without additional kernels patchs there's not much
which can be done to improve this.  Basically, this just means that
it may take 2-3 minutes before a ZFS is notified properly that a
device has failed.  This can be improved and I suspect I'll be
submitting patches upstream to handle this.
This commit is contained in:
Brian Behlendorf 2010-10-01 10:57:56 -07:00
parent c5343ba71b
commit 2959d94a0a
49 changed files with 241 additions and 10 deletions

View File

@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -42,6 +42,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -45,6 +45,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -0,0 +1,22 @@
dnl #
dnl # 2.6.28 API change
dnl # Device, transport, and driver FAILFAST flags were added and
dnl # the now legacy BIO_RW_FAILFAST flag was removed.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BIO_FAILFAST], [
AC_MSG_CHECKING([whether BIO_RW_FAILFAST_* are defined])
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
int flags;
flags = ((1 << BIO_RW_FAILFAST_DEV) |
(1 << BIO_RW_FAILFAST_TRANSPORT) |
(1 << BIO_RW_FAILFAST_DRIVER));
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_RW_FAILFAST, 1,
[BIO_RW_FAILFAST_* are defined])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -12,6 +12,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
ZFS_AC_KERNEL_BIO_FAILFAST
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
ZFS_AC_KERNEL_BIO_RW_SYNCIO
ZFS_AC_KERNEL_BLK_END_REQUEST

136
configure vendored
View File

@ -12613,6 +12613,74 @@ fi
{ $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <linux/bio.h>
int
main (void)
{
int flags;
flags = ((1 << BIO_RW_FAILFAST_DEV) |
(1 << BIO_RW_FAILFAST_TRANSPORT) |
(1 << BIO_RW_FAILFAST_DRIVER));
;
return 0;
}
_ACEOF
rm -Rf build && mkdir -p build
echo "obj-m := conftest.o" >build/Makefile
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_BIO_RW_FAILFAST 1
_ACEOF
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
rm -Rf build
{ $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
@ -15616,6 +15684,74 @@ fi
{ $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <linux/bio.h>
int
main (void)
{
int flags;
flags = ((1 << BIO_RW_FAILFAST_DEV) |
(1 << BIO_RW_FAILFAST_TRANSPORT) |
(1 << BIO_RW_FAILFAST_DRIVER));
;
return 0;
}
_ACEOF
rm -Rf build && mkdir -p build
echo "obj-m := conftest.o" >build/Makefile
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_BIO_RW_FAILFAST 1
_ACEOF
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
rm -Rf build
{ $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -202,6 +202,38 @@ struct req_iterator {
bio_for_each_segment(bvl, _iter.bio, _iter.i)
#endif /* HAVE_RQ_FOR_EACH_SEGMENT */
static inline void
bio_set_flags_failfast(struct block_device *bdev, int *flags)
{
#ifdef HAVE_BIO_RW_FAILFAST
/*
* Disable BIO_RW_FAILFAST_* for loopback devices because of
* the following incorrect BUG_ON() in loop_make_request().
* This support is also disabled for md devices because the
* test suite layers md devices on top of loopback devices.
* This may be removed when the loopback driver is fixed.
*
* BUG_ON(!lo || (rw != READ && rw != WRITE));
*/
#ifdef CONFIG_BUG
if ((MAJOR(bdev->bd_dev) == LOOP_MAJOR) ||
(MAJOR(bdev->bd_dev) == MD_MAJOR))
return;
#ifdef BLOCK_EXT_MAJOR
if (MAJOR(bdev->bd_dev) == BLOCK_EXT_MAJOR)
return;
#endif /* BLOCK_EXT_MAJOR */
#endif /* CONFIG_BUG */
*flags |=
((1 << BIO_RW_FAILFAST_DEV) |
(1 << BIO_RW_FAILFAST_TRANSPORT) |
(1 << BIO_RW_FAILFAST_DRIVER));
#else /* !HAVE_BIO_RW_FAILFAST */
*flags |= (1 << BIO_RW_FAILFAST);
#endif /* HAVE_BIO_RW_FAILFAST */
}
#ifndef DISK_NAME_LEN
#define DISK_NAME_LEN 32
#endif /* DISK_NAME_LEN */

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -42,6 +42,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -42,6 +42,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -44,6 +44,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -42,6 +42,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -42,6 +42,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -342,15 +342,13 @@ retry:
if (dr == NULL)
return ENOMEM;
if (zio && !(zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD)))
bio_set_flags_failfast(bdev, &flags);
dr->dr_zio = zio;
dr->dr_rw = flags;
block_size = vdev_bdev_block_size(bdev);
#ifdef BIO_RW_FAILFAST
if (flags & (1 << BIO_RW_FAILFAST))
dr->dr_rw |= 1 << BIO_RW_FAILFAST;
#endif /* BIO_RW_FAILFAST */
/*
* When the IO size exceeds the maximum bio size for the request
* queue we are forced to break the IO in multiple bio's and wait
@ -434,6 +432,7 @@ int
vdev_disk_physio(struct block_device *bdev, caddr_t kbuf,
size_t size, uint64_t offset, int flags)
{
bio_set_flags_failfast(bdev, &flags);
return __vdev_disk_physio(bdev, NULL, kbuf, size, offset, flags);
}
@ -540,11 +539,6 @@ vdev_disk_io_start(zio_t *zio)
return ZIO_PIPELINE_CONTINUE;
}
#ifdef BIO_RW_FAILFAST
if (zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD))
flags |= (1 << BIO_RW_FAILFAST);
#endif /* BIO_RW_FAILFAST */
error = __vdev_disk_physio(vd->vd_bdev, zio, zio->io_data,
zio->io_size, zio->io_offset, flags);
if (error) {

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -43,6 +43,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
$(top_srcdir)/config/kernel-bio-empty-barrier.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
$(top_srcdir)/config/kernel-bio-rw-syncio.m4 \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \

View File

@ -15,6 +15,9 @@
/* bio_empy_barrier() is defined */
#undef HAVE_BIO_EMPTY_BARRIER
/* BIO_RW_FAILFAST_* are defined */
#undef HAVE_BIO_RW_FAILFAST
/* BIO_RW_SYNCIO is defined */
#undef HAVE_BIO_RW_SYNCIO