xfs
[Top] [All Lists]

Re: [PATCH 6/7] xfs: add configuration handlers for specific errors

To: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Subject: Re: [PATCH 6/7] xfs: add configuration handlers for specific errors
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 5 May 2016 10:11:02 -0400
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1462376600-8617-7-git-send-email-cmaiolino@xxxxxxxxxx>
References: <1462376600-8617-1-git-send-email-cmaiolino@xxxxxxxxxx> <1462376600-8617-7-git-send-email-cmaiolino@xxxxxxxxxx>
User-agent: Mutt/1.6.0 (2016-04-01)
On Wed, May 04, 2016 at 05:43:19PM +0200, Carlos Maiolino wrote:
> now most of the infrastructure is in place, we can start adding
> support for configuring specific errors such as ENODEV, ENOSPC, EIO,
> etc. Add these error configurations and configure them all to have
> appropriate behaviours. That is, all will be configured to retry forever by
> default, except for ENODEV, which is an unrecoverable error, so it will be
> configured to not retry on error
> 
> Changelog:
> 
> V3:
>       - Do not implement .fail_speed and .fail_at_unmount
>       - .fail_at_unmount will be implemented in a different patch
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_mount.h |  3 +++
>  fs/xfs/xfs_sysfs.c | 20 ++++++++++++++++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index 0382140..e3b3267 100644
> --- a/fs/xfs/xfs_mount.h
> +++ b/fs/xfs/xfs_mount.h
> @@ -49,6 +49,9 @@ enum {
>  };
>  enum {
>       XFS_ERR_DEFAULT,
> +     XFS_ERR_EIO,
> +     XFS_ERR_ENOSPC,
> +     XFS_ERR_ENODEV,
>       XFS_ERR_ERRNO_MAX,
>  };
>  
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index c881360..1ed9033 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -481,6 +481,17 @@ static const struct xfs_error_init 
> xfs_error_meta_init[XFS_ERR_ERRNO_MAX] = {
>         .max_retries = -1,
>         .retry_timeout = 0,
>       },
> +     { .name = "EIO",
> +       .max_retries = -1,
> +       .retry_timeout = 0,
> +     },
> +     { .name = "ENOSPC",
> +       .max_retries = -1,
> +       .retry_timeout = 0,
> +     },
> +     { .name = "ENODEV",
> +       .max_retries = -1,

Shouldn't this be 0?

Brian

> +     },
>  };
>  
>  static int
> @@ -578,6 +589,15 @@ xfs_error_get_cfg(
>       struct xfs_error_cfg    *cfg;
>  
>       switch (error) {
> +     case EIO:
> +             cfg = &mp->m_error_cfg[error_class][XFS_ERR_EIO];
> +             break;
> +     case ENOSPC:
> +             cfg = &mp->m_error_cfg[error_class][XFS_ERR_ENOSPC];
> +             break;
> +     case ENODEV:
> +             cfg = &mp->m_error_cfg[error_class][XFS_ERR_ENODEV];
> +             break;
>       default:
>               cfg = &mp->m_error_cfg[error_class][XFS_ERR_DEFAULT];
>               break;
> -- 
> 2.4.11
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>