public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/7] xfs: introduce metadata IO error class
Date: Thu, 5 May 2016 10:10:32 -0400	[thread overview]
Message-ID: <20160505141031.GB1231@bfoster.bfoster> (raw)
In-Reply-To: <1462376600-8617-3-git-send-email-cmaiolino@redhat.com>

On Wed, May 04, 2016 at 05:43:15PM +0200, Carlos Maiolino wrote:
> Now we have the basic infrastructure, add the first error class so
> we can build up the infrastructure in a meaningful way. Add the
> metadata async write IO error class and sysfs entry, and introduce a
> default configuration that matches the existing "retry forever" behavior
> for async write metadata buffers.
> 
> Changelog:
> 
> V3:
> 	- Use 'cfg->max_retries = -1' as the default configuration for the
> 	  "retry forever" behavior, instead of
> 	  cfg->fail_speed = XFS_ERR_FAIL_NEVER
> 
> 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 | 34 ++++++++++++++++++++++++++++++++++
>  2 files changed, 37 insertions(+)
> 
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index d639795..352a5c8 100644
> --- a/fs/xfs/xfs_mount.h
> +++ b/fs/xfs/xfs_mount.h
> @@ -44,9 +44,11 @@ enum {
>   * Error numbers define the errors that are configurable.
>   */
>  enum {
> +	XFS_ERR_METADATA,
>  	XFS_ERR_CLASS_MAX,
>  };
>  enum {
> +	XFS_ERR_DEFAULT,
>  	XFS_ERR_ERRNO_MAX,
>  };
>  
> @@ -146,6 +148,7 @@ typedef struct xfs_mount {
>  						/* low free space thresholds */
>  	struct xfs_kobj		m_kobj;
>  	struct xfs_kobj		m_error_kobj;
> +	struct xfs_kobj		m_error_meta_kobj;
>  	struct xfs_error_cfg	m_error_cfg[XFS_ERR_CLASS_MAX][XFS_ERR_ERRNO_MAX];
>  	struct xstats		m_stats;	/* per-fs stats */
>  
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index b971113..7180cff 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -399,11 +399,34 @@ int
>  xfs_error_sysfs_init(
>  	struct xfs_mount	*mp)
>  {
> +	struct xfs_error_cfg	*cfg;
>  	int			error;
>  
>  	/* .../xfs/<dev>/error/ */
>  	error = xfs_sysfs_init(&mp->m_error_kobj, &xfs_error_ktype,
>  				&mp->m_kobj, "error");
> +	if (error)
> +		return error;
> +
> +	/* .../xfs/<dev>/error/metadata/ */
> +	error = xfs_sysfs_init(&mp->m_error_meta_kobj, &xfs_error_ktype,
> +				&mp->m_error_kobj, "metadata");
> +	if (error)
> +		goto out_error;
> +
> +	cfg = &mp->m_error_cfg[XFS_ERR_METADATA][XFS_ERR_DEFAULT];
> +	error = xfs_sysfs_init(&cfg->kobj, &xfs_error_cfg_ktype,
> +				&mp->m_error_meta_kobj, "default");
> +	if (error)
> +		goto out_error_meta;
> +	cfg->max_retries = -1;
> +
> +	return 0;
> +
> +out_error_meta:
> +	xfs_sysfs_del(&mp->m_error_meta_kobj);
> +out_error:
> +	xfs_sysfs_del(&mp->m_error_kobj);
>  	return error;
>  }
>  
> @@ -411,5 +434,16 @@ void
>  xfs_error_sysfs_del(
>  	struct xfs_mount	*mp)
>  {
> +	struct xfs_error_cfg	*cfg;
> +	int			i, j;
> +
> +	for (i = 0; i < XFS_ERR_CLASS_MAX; i++) {
> +		for (j = 0; j < XFS_ERR_ERRNO_MAX; j++) {
> +			cfg = &mp->m_error_cfg[i][j];
> +
> +			xfs_sysfs_del(&cfg->kobj);
> +		}
> +	}
> +	xfs_sysfs_del(&mp->m_error_meta_kobj);
>  	xfs_sysfs_del(&mp->m_error_kobj);
>  }
> -- 
> 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

  reply	other threads:[~2016-05-05 14:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 15:43 [PATCH 0/7] Configurable error behavior [V3] Carlos Maiolino
2016-05-04 15:43 ` [PATCH 1/7] xfs: configurable error behavior via sysfs Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 2/7] xfs: introduce metadata IO error class Carlos Maiolino
2016-05-05 14:10   ` Brian Foster [this message]
2016-05-04 15:43 ` [PATCH 3/7] xfs: add configurable error support to metadata buffers Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 4/7] xfs: introduce table-based init for error behaviors Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-04 15:43 ` [PATCH 5/7] xfs: add configuration of error failure speed Carlos Maiolino
2016-05-05 14:10   ` Brian Foster
2016-05-06  0:04   ` Dave Chinner
2016-05-06 10:59     ` 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
2016-05-04 15:43 ` [PATCH 7/7] xfs: add "fail at unmount" error handling configuration Carlos Maiolino
2016-05-05 14:11 ` [PATCH 0/7] Configurable error behavior [V3] Brian Foster
2016-05-05 14:37   ` Carlos Maiolino
2016-05-05 15:18     ` Brian Foster
2016-05-05 23:49       ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2016-05-10 12:16 [PATCH 0/7] Configurable error behavior [V4] Carlos Maiolino
2016-05-10 12:16 ` [PATCH 2/7] xfs: introduce metadata IO error class Carlos Maiolino
2016-05-03 17:55 [PATCH 0/7] Configurable error behavior [V2] Carlos Maiolino
2016-05-03 17:55 ` [PATCH 2/7] xfs: introduce metadata IO error class 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=20160505141031.GB1231@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