diff options
author | Carlos Maiolino <cmaiolino@redhat.com> | 2016-05-18 02:58:51 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-18 02:58:51 +0200 |
commit | 192852be8b5fb14268c2133fe9ce5312e4745963 (patch) | |
tree | b859e946965a129ee024aba4136fa5c79bc56cfe /fs/xfs/xfs_mount.h | |
parent | xfs: buffer ->bi_end_io function requires irq-safe lock (diff) | |
download | linux-192852be8b5fb14268c2133fe9ce5312e4745963.tar.xz linux-192852be8b5fb14268c2133fe9ce5312e4745963.zip |
xfs: configurable error behavior via sysfs
We need to be able to change the way XFS behaviours in error
conditions depending on the type of underlying storage. This is
necessary for handling non-traditional block devices with extended
error cases, such as thin provisioned devices that can return ENOSPC
as an IO error.
Introduce the basic sysfs infrastructure needed to define and
configure error behaviours. This is done to be generic enough to
extend to configuring behaviour in other error conditions, such as
ENOMEM, which also has different desired behaviours according to
machine configuration.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index bac6b3435591..d639795b0310 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -37,6 +37,24 @@ enum { XFS_LOWSP_MAX, }; +/* + * Error Configuration + * + * Error classes define the subsystem the configuration belongs to. + * Error numbers define the errors that are configurable. + */ +enum { + XFS_ERR_CLASS_MAX, +}; +enum { + XFS_ERR_ERRNO_MAX, +}; + +struct xfs_error_cfg { + struct xfs_kobj kobj; + int max_retries; +}; + typedef struct xfs_mount { struct super_block *m_super; xfs_tid_t m_tid; /* next unused tid for fs */ @@ -127,6 +145,8 @@ typedef struct xfs_mount { int64_t m_low_space[XFS_LOWSP_MAX]; /* low free space thresholds */ struct xfs_kobj m_kobj; + struct xfs_kobj m_error_kobj; + struct xfs_error_cfg m_error_cfg[XFS_ERR_CLASS_MAX][XFS_ERR_ERRNO_MAX]; struct xstats m_stats; /* per-fs stats */ struct workqueue_struct *m_buf_workqueue; |