aboutsummaryrefslogtreecommitdiffstats
path: root/include/os
diff options
context:
space:
mode:
authorMariusz Zaborski <[email protected]>2022-11-10 22:37:12 +0100
committerGitHub <[email protected]>2022-11-10 13:37:12 -0800
commit16f0fdadddcc7562ddf475f496a434b9ac94b0f7 (patch)
tree79bdd273de7140b74a55a1425bdfd55abf51c3a1 /include/os
parent945b407486a0072ec7dd117a0bde2f72d52eb445 (diff)
Allow to control failfast
Linux defaults to setting "failfast" on BIOs, so that the OS will not retry IOs that fail, and instead report the error to ZFS. In some cases, such as errors reported by the HBA driver, not the device itself, we would wish to retry rather than generating vdev errors in ZFS. This new property allows that. This introduces a per vdev option to disable the failfast option. This also introduces a global module parameter to define the failfast mask value. Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Allan Jude <[email protected]> Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Mariusz Zaborski <[email protected]> Sponsored-by: Seagate Technology LLC Submitted-by: Klara, Inc. Closes #14056
Diffstat (limited to 'include/os')
-rw-r--r--include/os/linux/kernel/linux/blkdev_compat.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h
index 327679653..45de1f499 100644
--- a/include/os/linux/kernel/linux/blkdev_compat.h
+++ b/include/os/linux/kernel/linux/blkdev_compat.h
@@ -126,7 +126,8 @@ typedef int bvec_iterator_t;
#endif
static inline void
-bio_set_flags_failfast(struct block_device *bdev, int *flags)
+bio_set_flags_failfast(struct block_device *bdev, int *flags, bool dev,
+ bool transport, bool driver)
{
#ifdef CONFIG_BUG
/*
@@ -148,7 +149,12 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
#endif /* BLOCK_EXT_MAJOR */
#endif /* CONFIG_BUG */
- *flags |= REQ_FAILFAST_MASK;
+ if (dev)
+ *flags |= REQ_FAILFAST_DEV;
+ if (transport)
+ *flags |= REQ_FAILFAST_TRANSPORT;
+ if (driver)
+ *flags |= REQ_FAILFAST_DRIVER;
}
/*