From: Brian Foster <bfoster@redhat.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 6/7] xfs: add configuration handlers for specific errors
Date: Wed, 11 May 2016 10:15:43 -0400 [thread overview]
Message-ID: <20160511141542.GC42410@bfoster.bfoster> (raw)
In-Reply-To: <1462882581-30859-7-git-send-email-cmaiolino@redhat.com>
On Tue, May 10, 2016 at 02:16:20PM +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
>
> V4:
> - ENODEV should fail immediately by default
> - Use XFS_ERR_RETRY_FOREVER flag, instead of -1 directly
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_mount.h | 3 +++
> fs/xfs/xfs_sysfs.c | 22 +++++++++++++++++++++-
> 2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index 2fafa94..72ec3e3 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 918d144..084a606 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -478,9 +478,20 @@ struct xfs_error_init {
>
> static const struct xfs_error_init xfs_error_meta_init[XFS_ERR_ERRNO_MAX] = {
> { .name = "default",
> - .max_retries = -1,
> + .max_retries = XFS_ERR_RETRY_FOREVER,
> .retry_timeout = 0,
> },
> + { .name = "EIO",
> + .max_retries = XFS_ERR_RETRY_FOREVER,
> + .retry_timeout = 0,
> + },
> + { .name = "ENOSPC",
> + .max_retries = XFS_ERR_RETRY_FOREVER,
> + .retry_timeout = 0,
> + },
> + { .name = "ENODEV",
> + .max_retries = 0,
> + },
> };
>
> 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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-05-11 14:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 12:16 [PATCH 0/7] Configurable error behavior [V4] Carlos Maiolino
2016-05-10 12:16 ` [PATCH 1/7] xfs: configurable error behavior via sysfs Carlos Maiolino
2016-05-10 12:16 ` [PATCH 2/7] xfs: introduce metadata IO error class Carlos Maiolino
2016-05-10 12:16 ` [PATCH 3/7] xfs: add configurable error support to metadata buffers Carlos Maiolino
2016-05-11 14:15 ` Brian Foster
2016-05-10 12:16 ` [PATCH 4/7] xfs: introduce table-based init for error behaviors Carlos Maiolino
2016-05-10 12:16 ` [PATCH 5/7] xfs: add configuration of error failure speed Carlos Maiolino
2016-05-10 12:16 ` [PATCH 6/7] xfs: add configuration handlers for specific errors Carlos Maiolino
2016-05-11 14:15 ` Brian Foster [this message]
2016-05-10 12:16 ` [PATCH 7/7] xfs: add "fail at unmount" error handling configuration Carlos Maiolino
2016-05-11 14:15 ` Brian Foster
2016-05-11 14:39 ` Carlos Maiolino
2016-05-11 14:15 ` [PATCH 0/7] Configurable error behavior [V4] Brian Foster
2016-05-11 14:40 ` Carlos Maiolino
2016-05-11 23:23 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2016-05-04 15:43 [PATCH 0/7] Configurable error behavior [V3] Carlos Maiolino
2016-05-04 15:43 ` [PATCH 6/7] xfs: add configuration handlers for specific errors Carlos Maiolino
2016-05-05 14:11 ` Brian Foster
2016-05-05 23:57 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160511141542.GC42410@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=cmaiolino@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox