From a5ea70d25d76950e11690110b526374307d05d81 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Wed, 18 May 2016 11:08:15 +1000 Subject: xfs: add configuration of error failure speed On reception of an error, we can fail immediately, perform some bound amount of retries or retry indefinitely. The current behaviour we have is to retry forever. However, we'd like the ability to choose how long the filesystem should try after an error, it can either fail immediately, retry a few times, or retry forever. This is implemented by using max_retries sysfs attribute, to hold the amount of times we allow the filesystem to retry after an error. Being -1 a special case where the filesystem will retry indefinitely. Add both a maximum retry count and a retry timeout so that we can bound by time and/or physical IO attempts. Finally, plumb these into xfs_buf_iodone error processing so that the error behaviour follows the selected configuration. Signed-off-by: Dave Chinner Signed-off-by: Carlos Maiolino Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- fs/xfs/xfs_mount.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/xfs/xfs_mount.h') diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 0c5a97644d78..2fafa9438bcf 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -52,9 +52,12 @@ enum { XFS_ERR_ERRNO_MAX, }; +#define XFS_ERR_RETRY_FOREVER -1 + struct xfs_error_cfg { struct xfs_kobj kobj; int max_retries; + unsigned long retry_timeout; /* in jiffies, 0 = no timeout */ }; typedef struct xfs_mount { -- cgit v1.2.3