From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 7/9] xfs: add configuration handles for specific errors
Date: Fri, 5 Feb 2016 12:23:25 +1100 [thread overview]
Message-ID: <1454635407-22276-8-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1454635407-22276-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
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 use the "fail never, fail
at unmount" default except for ENODEV, which is an unrecoverable
error so it will be configured as a "fail fast" error.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_mount.h | 3 +++
fs/xfs/xfs_sysfs.c | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index edeb0b6..c05b500 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -50,6 +50,9 @@ enum {
};
enum {
XFS_ERR_DEFAULT,
+ XFS_ERR_EIO,
+ XFS_ERR_ENOSPC,
+ XFS_ERR_ENODEV,
XFS_ERR_ERRNO_MAX,
};
enum {
diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
index a5b040a..d48dc46 100644
--- a/fs/xfs/xfs_sysfs.c
+++ b/fs/xfs/xfs_sysfs.c
@@ -507,6 +507,21 @@ static const struct xfs_error_init xfs_error_meta_init[XFS_ERR_ERRNO_MAX] = {
.retry_timeout = 0,
.fail_at_unmount = true,
},
+ { .name = "EIO",
+ .fail_speed = XFS_ERR_FAIL_NEVER,
+ .max_retries = INT_MAX,
+ .retry_timeout = 0,
+ .fail_at_unmount = true,
+ },
+ { .name = "ENOSPC",
+ .fail_speed = XFS_ERR_FAIL_NEVER,
+ .max_retries = INT_MAX,
+ .retry_timeout = 0,
+ .fail_at_unmount = true,
+ },
+ { .name = "ENODEV",
+ .fail_speed = XFS_ERR_FAIL_FAST,
+ },
};
static int
@@ -606,6 +621,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.5.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-02-05 1:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 1:23 [PATCH 0/9] xfs: configurable error behaviour Dave Chinner
2016-02-05 1:23 ` [PATCH 1/9] xfs: configurable error behaviour via sysfs Dave Chinner
2016-02-05 1:23 ` [PATCH 2/9] xfs: introduce metadata IO error class Dave Chinner
2016-02-05 1:23 ` [PATCH 3/9] xfs: add configurable error support to metadata buffers Dave Chinner
2016-02-05 1:23 ` [PATCH 4/9] xfs: introduce table-based init for error behaviours Dave Chinner
2016-02-05 1:23 ` [PATCH 5/9] xfs: add configuration of error failure speed Dave Chinner
2016-02-16 16:44 ` Brian Foster
2016-02-05 1:23 ` [PATCH 6/9] xfs: add "fail at unmount" error handling configuration Dave Chinner
2016-02-16 16:44 ` Brian Foster
2016-02-16 17:09 ` Eric Sandeen
2016-02-05 1:23 ` Dave Chinner [this message]
2016-02-05 1:23 ` [PATCH 8/9] xfs: disable specific error configurations Dave Chinner
2016-02-16 16:45 ` Brian Foster
2016-02-05 1:23 ` [PATCH 9/9] xfs: add kmem error configuration class Dave Chinner
2016-02-13 2:52 ` [PATCH 0/9] xfs: configurable error behaviour Dave Chinner
2016-03-15 10:16 ` Carlos Maiolino
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=1454635407-22276-8-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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